@Test public void testConfigure() { ResourceConfig jerseyEnvironment = new DropwizardResourceConfig(); WebSocketEnvironment environment = mock(WebSocketEnvironment.class ); WebSocketServletFactory servletFactory = mock(WebSocketServletFactory.class ); when(environment.jersey()).thenReturn(jerseyEnvironment); WebSocketResourceProviderFactory factory = new WebSocketResourceProviderFactory(environment, Account.class); factory.configure(servletFactory); verify(servletFactory).setCreator(eq(factory)); }
@Override public void configure(WebSocketServletFactory factory) { factory.setCreator(this); }
WebSocketResourceProviderFactory extends WebSocketServlet implements WebSocketCreator { @Override public void configure(WebSocketServletFactory factory) { factory.setCreator(this); } }
WebSocketResourceProviderFactory extends WebSocketServlet implements WebSocketCreator { @Override public void configure(WebSocketServletFactory factory) { factory.setCreator(this); } WebSocketResourceProviderFactory(WebSocketEnvironment<T> environment, Class<T> principalClass); }
WebSocketResourceProviderFactory extends WebSocketServlet implements WebSocketCreator { @Override public void configure(WebSocketServletFactory factory) { factory.setCreator(this); } WebSocketResourceProviderFactory(WebSocketEnvironment<T> environment, Class<T> principalClass); @Override Object createWebSocket(ServletUpgradeRequest request, ServletUpgradeResponse response); @Override void configure(WebSocketServletFactory factory); }
WebSocketResourceProviderFactory extends WebSocketServlet implements WebSocketCreator { @Override public void configure(WebSocketServletFactory factory) { factory.setCreator(this); } WebSocketResourceProviderFactory(WebSocketEnvironment<T> environment, Class<T> principalClass); @Override Object createWebSocket(ServletUpgradeRequest request, ServletUpgradeResponse response); @Override void configure(WebSocketServletFactory factory);  }