diff --git a/docs/src/reference/docbook/xmpp.xml b/docs/src/reference/docbook/xmpp.xml
index 36eaf0762b..859f1beb5d 100644
--- a/docs/src/reference/docbook/xmpp.xml
+++ b/docs/src/reference/docbook/xmpp.xml
@@ -58,6 +58,13 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/xmpp
subscription-mode="accept_all"/>
]]>
+
+
+
+ For added convenience you can rely on the default naming convention and omit the id attribute.
+ The default name xmppConnection will be used for this connection bean.
+
+
@@ -183,6 +190,15 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/xmpp
Like its inbound counterpart, it requires a reference to an XMPP Connection.
+
+
+
+ If you are relying on default naming convention for XMPP Connection bean (described earlier) and you only have one
+ XMPP Connection bean configured in your Application Context, you may omit the xmpp-connection attribute and
+ rely on the default naming convention. The bean with the name xmppConnection will be located and
+ injected into the adapters.
+
+
Appendices
diff --git a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java
index ae24e82b20..184862f29c 100644
--- a/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java
+++ b/spring-integration-xmpp/src/test/java/org/springframework/integration/xmpp/config/ChatMessageOutboundChannelAdapterParserTests.java
@@ -83,12 +83,8 @@ public class ChatMessageOutboundChannelAdapterParserTests {
MessageChannel channel = context.getBean("outboundEventChannel", MessageChannel.class);
Message> message = MessageBuilder.withPayload("hello").setHeader(XmppHeaders.CHAT_TO, "oleg").build();
XMPPConnection connection = context.getBean("testConnection", XMPPConnection.class);
- ChatManager chatManager = mock(ChatManager.class);
- when(connection.getChatManager()).thenReturn(chatManager);
- Chat chat = mock(Chat.class);
- when(chatManager.createChat(Mockito.anyString(), Mockito.any(MessageListener.class))).thenReturn(chat);
channel.send(message);
- //verify(chat, times(1)).sendMessage("hello");
+ verify(connection, times(1)).sendPacket(Mockito.any(org.jivesoftware.smack.packet.Message.class));
}
}