### Question:
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);  }### Answer:
@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)); }