private static final Stanza STANZA = XMPPCoreStanza.getWrapper(StanzaBuilder.createMessageStanza(FROM, TO, LANG,
BODY).build());
public void testRemoteServerError() throws Exception {
XMPPServerConnectorRegistry registry = Mockito.mock(XMPPServerConnectorRegistry.class);
Mockito.when(registry.connect(SERVER)).thenThrow(new RemoteServerNotFoundException());
ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
Mockito.when(serverRuntimeContext.getServerConnectorRegistry()).thenReturn(registry);
DeliveringExternalInboundStanzaRelay relay = new DeliveringExternalInboundStanzaRelay(new TestExecutorService());