RoboconfWebSocketServlet extends WebSocketServlet { @Override public void configure( WebSocketServletFactory factory ) { factory.register( RoboconfWebSocket.class ); }  @Override void configure( WebSocketServletFactory factory );  }
@Test public void testFactoryConfiguration() { RoboconfWebSocketServlet servlet = new RoboconfWebSocketServlet(); WebSocketServletFactory factory = Mockito.mock( WebSocketServletFactory.class ); servlet.configure( factory ); Mockito.verify( factory ).register( RoboconfWebSocket.class ); }