From 4c218c96f61738ed99d5f925f50bfb3a21805e9f Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 18 Jan 2015 11:03:03 +0100 Subject: [PATCH] Move Stream Management code into o.j.smack.sm from o.jsmack.tcp.sm, as XEP-198 Stream Management is not an "XMPP over TCP" exclusive feature. It could also be use together with the Websocket binding of XMPP, so we may have a smack-streammangement in the future. This change prepares for that by moving the SM code out of the XMPP TCP package namespace. --- .../java/org/jivesoftware/smack/Chat.java | 3 +- .../smack/{tcp => }/sm/SMUtils.java | 2 +- .../sm/StreamManagementException.java | 2 +- .../{tcp => }/sm/packet/StreamManagement.java | 2 +- .../sm/predicates/AfterXStanzas.java | 2 +- .../sm/predicates/ForEveryMessage.java | 2 +- .../sm/predicates/ForEveryStanza.java | 2 +- .../ForMatchingPredicateOrAfterXStanzas.java | 2 +- .../sm/predicates/OnceForThisStanza.java | 2 +- .../{tcp => }/sm/predicates/Predicate.java | 2 +- .../sm/predicates/ShortcutPredicates.java | 2 +- .../sm/provider/ParseStreamManagement.java | 12 +++---- ...StreamManagementStreamFeatureProvider.java | 4 +-- .../smack/tcp/XMPPTCPConnection.java | 32 ++++++++--------- .../smacktcp.providers | 2 +- .../provider/ParseStreamManagementTest.java | 4 +-- .../smack/tcp/TcpInitializerTest.java | 34 +++++++++++++++++++ 17 files changed, 72 insertions(+), 39 deletions(-) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/SMUtils.java (97%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/StreamManagementException.java (97%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/packet/StreamManagement.java (99%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/predicates/AfterXStanzas.java (96%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/predicates/ForEveryMessage.java (95%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/predicates/ForEveryStanza.java (95%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/predicates/ForMatchingPredicateOrAfterXStanzas.java (96%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/predicates/OnceForThisStanza.java (97%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/predicates/Predicate.java (94%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/predicates/ShortcutPredicates.java (96%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/provider/ParseStreamManagement.java (89%) rename smack-tcp/src/main/java/org/jivesoftware/smack/{tcp => }/sm/provider/StreamManagementStreamFeatureProvider.java (88%) rename smack-tcp/src/test/java/org/jivesoftware/smack/{tcp => }/sm/provider/ParseStreamManagementTest.java (98%) create mode 100644 smack-tcp/src/test/java/org/jivesoftware/smack/tcp/TcpInitializerTest.java diff --git a/smack-core/src/main/java/org/jivesoftware/smack/Chat.java b/smack-core/src/main/java/org/jivesoftware/smack/Chat.java index f8a6afe58..d78277ad0 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/Chat.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/Chat.java @@ -89,10 +89,9 @@ public class Chat { * * * @param text the text to send. - * @throws XMPPException if sending the message fails. * @throws NotConnectedException */ - public void sendMessage(String text) throws XMPPException, NotConnectedException { + public void sendMessage(String text) throws NotConnectedException { Message message = new Message(); message.setBody(text); sendMessage(message); diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/SMUtils.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/SMUtils.java similarity index 97% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/SMUtils.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/SMUtils.java index 49be69e99..d688a3bff 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/SMUtils.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/SMUtils.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm; +package org.jivesoftware.smack.sm; import java.math.BigInteger; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/StreamManagementException.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/StreamManagementException.java similarity index 97% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/StreamManagementException.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/StreamManagementException.java index 179fb93f1..95278f3af 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/StreamManagementException.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/StreamManagementException.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm; +package org.jivesoftware.smack.sm; import org.jivesoftware.smack.SmackException; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/packet/StreamManagement.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/packet/StreamManagement.java similarity index 99% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/packet/StreamManagement.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/packet/StreamManagement.java index ff6e8aa2d..c92925d9b 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/packet/StreamManagement.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/packet/StreamManagement.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.packet; +package org.jivesoftware.smack.sm.packet; import org.jivesoftware.smack.packet.FullStreamElement; import org.jivesoftware.smack.packet.PacketExtension; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/AfterXStanzas.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/AfterXStanzas.java similarity index 96% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/AfterXStanzas.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/AfterXStanzas.java index de9a9f006..5741e26f9 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/AfterXStanzas.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/AfterXStanzas.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.predicates; +package org.jivesoftware.smack.sm.predicates; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Packet; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForEveryMessage.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForEveryMessage.java similarity index 95% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForEveryMessage.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForEveryMessage.java index d4a9b5661..334cd83a6 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForEveryMessage.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForEveryMessage.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.predicates; +package org.jivesoftware.smack.sm.predicates; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Message; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForEveryStanza.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForEveryStanza.java similarity index 95% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForEveryStanza.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForEveryStanza.java index 93e9b81ec..fefcab57c 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForEveryStanza.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForEveryStanza.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.predicates; +package org.jivesoftware.smack.sm.predicates; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Packet; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForMatchingPredicateOrAfterXStanzas.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForMatchingPredicateOrAfterXStanzas.java similarity index 96% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForMatchingPredicateOrAfterXStanzas.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForMatchingPredicateOrAfterXStanzas.java index 125b293e4..83a3837c3 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ForMatchingPredicateOrAfterXStanzas.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ForMatchingPredicateOrAfterXStanzas.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.predicates; +package org.jivesoftware.smack.sm.predicates; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Packet; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/OnceForThisStanza.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/OnceForThisStanza.java similarity index 97% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/OnceForThisStanza.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/OnceForThisStanza.java index 2c4689205..34b592c7a 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/OnceForThisStanza.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/OnceForThisStanza.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.predicates; +package org.jivesoftware.smack.sm.predicates; import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.packet.Packet; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/Predicate.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/Predicate.java similarity index 94% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/Predicate.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/Predicate.java index d70db568b..420924e6c 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/Predicate.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/Predicate.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.predicates; +package org.jivesoftware.smack.sm.predicates; import org.jivesoftware.smack.filter.PacketFilter; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ShortcutPredicates.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ShortcutPredicates.java similarity index 96% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ShortcutPredicates.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ShortcutPredicates.java index 96e422133..4c25d0179 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/predicates/ShortcutPredicates.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/predicates/ShortcutPredicates.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.predicates; +package org.jivesoftware.smack.sm.predicates; import java.util.Collection; import java.util.LinkedHashSet; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/provider/ParseStreamManagement.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/provider/ParseStreamManagement.java similarity index 89% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/provider/ParseStreamManagement.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/provider/ParseStreamManagement.java index d33c3e3ca..9b5fd3f75 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/provider/ParseStreamManagement.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/provider/ParseStreamManagement.java @@ -14,16 +14,16 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.provider; +package org.jivesoftware.smack.sm.provider; import java.io.IOException; import org.jivesoftware.smack.packet.XMPPError; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.AckAnswer; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.AckRequest; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Enabled; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Failed; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Resumed; +import org.jivesoftware.smack.sm.packet.StreamManagement.AckAnswer; +import org.jivesoftware.smack.sm.packet.StreamManagement.AckRequest; +import org.jivesoftware.smack.sm.packet.StreamManagement.Enabled; +import org.jivesoftware.smack.sm.packet.StreamManagement.Failed; +import org.jivesoftware.smack.sm.packet.StreamManagement.Resumed; import org.jivesoftware.smack.util.ParserUtils; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/provider/StreamManagementStreamFeatureProvider.java b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/provider/StreamManagementStreamFeatureProvider.java similarity index 88% rename from smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/provider/StreamManagementStreamFeatureProvider.java rename to smack-tcp/src/main/java/org/jivesoftware/smack/sm/provider/StreamManagementStreamFeatureProvider.java index 8a1869528..46e5d2497 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/sm/provider/StreamManagementStreamFeatureProvider.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/sm/provider/StreamManagementStreamFeatureProvider.java @@ -14,10 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jivesoftware.smack.tcp.sm.provider; +package org.jivesoftware.smack.sm.provider; import org.jivesoftware.smack.provider.PacketExtensionProvider; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.StreamManagementFeature; +import org.jivesoftware.smack.sm.packet.StreamManagement.StreamManagementFeature; import org.xmlpull.v1.XmlPullParser; public class StreamManagementStreamFeatureProvider extends PacketExtensionProvider { diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index a37827bdd..46821203d 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -51,23 +51,23 @@ import org.jivesoftware.smack.sasl.packet.SaslStreamElements; import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Challenge; import org.jivesoftware.smack.sasl.packet.SaslStreamElements.SASLFailure; import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Success; +import org.jivesoftware.smack.sm.SMUtils; +import org.jivesoftware.smack.sm.StreamManagementException; +import org.jivesoftware.smack.sm.StreamManagementException.StreamIdDoesNotMatchException; +import org.jivesoftware.smack.sm.StreamManagementException.StreamManagementNotEnabledException; +import org.jivesoftware.smack.sm.packet.StreamManagement; +import org.jivesoftware.smack.sm.packet.StreamManagement.AckAnswer; +import org.jivesoftware.smack.sm.packet.StreamManagement.AckRequest; +import org.jivesoftware.smack.sm.packet.StreamManagement.Enable; +import org.jivesoftware.smack.sm.packet.StreamManagement.Enabled; +import org.jivesoftware.smack.sm.packet.StreamManagement.Failed; +import org.jivesoftware.smack.sm.packet.StreamManagement.Resume; +import org.jivesoftware.smack.sm.packet.StreamManagement.Resumed; +import org.jivesoftware.smack.sm.packet.StreamManagement.StreamManagementFeature; +import org.jivesoftware.smack.sm.predicates.Predicate; +import org.jivesoftware.smack.sm.provider.ParseStreamManagement; import org.jivesoftware.smack.packet.PlainStreamElement; import org.jivesoftware.smack.packet.XMPPError; -import org.jivesoftware.smack.tcp.sm.SMUtils; -import org.jivesoftware.smack.tcp.sm.StreamManagementException; -import org.jivesoftware.smack.tcp.sm.StreamManagementException.StreamManagementNotEnabledException; -import org.jivesoftware.smack.tcp.sm.StreamManagementException.StreamIdDoesNotMatchException; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.AckAnswer; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.AckRequest; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Enable; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Enabled; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Failed; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Resume; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.Resumed; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement.StreamManagementFeature; -import org.jivesoftware.smack.tcp.sm.predicates.Predicate; -import org.jivesoftware.smack.tcp.sm.provider.ParseStreamManagement; import org.jivesoftware.smack.util.ArrayBlockingQueueWithShutdown; import org.jivesoftware.smack.util.Async; import org.jivesoftware.smack.util.PacketParserUtils; @@ -1424,7 +1424,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * Add a predicate for Stream Management acknowledgment requests. *

* Those predicates are used to determine when a Stream Management acknowledgement request is send to the server. - * Some pre-defined predicates are found in the org.jivesoftware.smack.tcp.sm.predicates package. + * Some pre-defined predicates are found in the org.jivesoftware.smack.sm.predicates package. *

*

* If not predicate is configured, the {@link Predicate#forMessagesOrAfter5Stanzas()} will be used. diff --git a/smack-tcp/src/main/resources/org.jivesoftware.smack.tcp/smacktcp.providers b/smack-tcp/src/main/resources/org.jivesoftware.smack.tcp/smacktcp.providers index 2b9c8fd86..92238115e 100644 --- a/smack-tcp/src/main/resources/org.jivesoftware.smack.tcp/smacktcp.providers +++ b/smack-tcp/src/main/resources/org.jivesoftware.smack.tcp/smacktcp.providers @@ -5,7 +5,7 @@ sm urn:xmpp:sm:3 - org.jivesoftware.smack.tcp.sm.provider.StreamManagementStreamFeatureProvider + org.jivesoftware.smack.sm.provider.StreamManagementStreamFeatureProvider diff --git a/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/sm/provider/ParseStreamManagementTest.java b/smack-tcp/src/test/java/org/jivesoftware/smack/sm/provider/ParseStreamManagementTest.java similarity index 98% rename from smack-tcp/src/test/java/org/jivesoftware/smack/tcp/sm/provider/ParseStreamManagementTest.java rename to smack-tcp/src/test/java/org/jivesoftware/smack/sm/provider/ParseStreamManagementTest.java index 5680ee770..5f164181f 100644 --- a/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/sm/provider/ParseStreamManagementTest.java +++ b/smack-tcp/src/test/java/org/jivesoftware/smack/sm/provider/ParseStreamManagementTest.java @@ -16,12 +16,12 @@ */ -package org.jivesoftware.smack.tcp.sm.provider; +package org.jivesoftware.smack.sm.provider; import com.jamesmurty.utils.XMLBuilder; import org.jivesoftware.smack.packet.XMPPError; -import org.jivesoftware.smack.tcp.sm.packet.StreamManagement; +import org.jivesoftware.smack.sm.packet.StreamManagement; import org.jivesoftware.smack.util.PacketParserUtils; import org.junit.Test; import org.xmlpull.v1.XmlPullParser; diff --git a/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/TcpInitializerTest.java b/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/TcpInitializerTest.java new file mode 100644 index 000000000..1b56187e6 --- /dev/null +++ b/smack-tcp/src/test/java/org/jivesoftware/smack/tcp/TcpInitializerTest.java @@ -0,0 +1,34 @@ +/** + * + * Copyright 2015 Florian Schmaus + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jivesoftware.smack.tcp; + +import static org.junit.Assert.assertTrue; + +import java.util.List; + +import org.junit.Test; + +public class TcpInitializerTest { + + @Test + public void testExtensionInitializer() { + TCPInitializer initializer = new TCPInitializer(); + List exceptions = initializer.initialize(); + assertTrue(exceptions.size() == 0); + } + +}