### Question:
XmppWebSocketTransportModule extends ModularXmppClientToServerConnectionModule<XmppWebSocketTransportModuleDescriptor> { @Override protected XmppWebSocketTransport getTransport() { return websocketTransport; } protected  XmppWebSocketTransportModule(XmppWebSocketTransportModuleDescriptor moduleDescriptor,
                    ModularXmppClientToServerConnectionInternal connectionInternal); EstablishingWebSocketConnectionState constructEstablishingWebSocketConnectionState(
                    EstablishingWebSocketConnectionStateDescriptor establishingWebSocketConnectionStateDescriptor,
                    ModularXmppClientToServerConnectionInternal connectionInternal);  }### Answer:
@Test public void websocketEndpointDiscoveryTest() throws URISyntaxException { XmppWebSocketTransportModuleDescriptor websocketTransportModuleDescriptor = getWebSocketDescriptor(); ModularXmppClientToServerConnectionInternal connectionInternal = mock(ModularXmppClientToServerConnectionInternal.class); XmppWebSocketTransportModule transportModule = new XmppWebSocketTransportModule(websocketTransportModuleDescriptor, connectionInternal); XmppWebSocketTransportModule.XmppWebSocketTransport transport = transportModule.getTransport(); assertThrows(AssertionError.class, () -> transport.new DiscoveredWebSocketEndpoints(null)); assertThrows(AssertionError.class, () -> transport.new WebSocketEndpointsDiscoveryFailed(null)); WebSocketRemoteConnectionEndpoint endpoint = new WebSocketRemoteConnectionEndpoint("wss: List<WebSocketRemoteConnectionEndpoint> discoveredRemoteConnectionEndpoints = new ArrayList<>(); discoveredRemoteConnectionEndpoints.add(endpoint); HttpLookupFailure httpLookupFailure = new RemoteConnectionEndpointLookupFailure.HttpLookupFailure(null, null); List<RemoteConnectionEndpointLookupFailure> failureList = new ArrayList<>(); failureList.add(httpLookupFailure); Result result = new Result(discoveredRemoteConnectionEndpoints, failureList); DiscoveredWebSocketEndpoints discoveredWebSocketEndpoints = transport.new DiscoveredWebSocketEndpoints(result); assertNotNull(discoveredWebSocketEndpoints.getResult()); WebSocketEndpointsDiscoveryFailed endpointsDiscoveryFailed = transport.new WebSocketEndpointsDiscoveryFailed(result); assertNotNull(endpointsDiscoveryFailed.toString()); }
@Test public void lookupConnectionEndpointsTest() throws URISyntaxException { XmppWebSocketTransportModuleDescriptor websocketTransportModuleDescriptor = getWebSocketDescriptor(); ModularXmppClientToServerConnectionInternal connectionInternal = mock(ModularXmppClientToServerConnectionInternal.class); XmppWebSocketTransportModule transportModule = new XmppWebSocketTransportModule(websocketTransportModuleDescriptor, connectionInternal); XmppWebSocketTransportModule.XmppWebSocketTransport transport = transportModule.getTransport(); assertNotNull(transport.lookupConnectionEndpoints()); }