InOrder inOrder = inOrder(servlet, consumer, sync, servlets, handler);
ArgumentCaptor<WebsocketComponentServlet> servletCaptor = ArgumentCaptor.forClass(WebsocketComponentServlet.class);
inOrder.verify(servlets, times(1)).put(eq(PATH_SPEC_ONE), servletCaptor.capture());
ArgumentCaptor<ServletHolder> holderCaptor = ArgumentCaptor.forClass(ServletHolder.class);
inOrder.verify(handler, times(1)).addServlet(holderCaptor.capture(), eq(PATH_SPEC_ONE));
inOrder.verifyNoMoreInteractions();
assertEquals(servletCaptor.getValue(), holderCaptor.getValue().getServlet());
}
@Test
public void testAddServletProducersOnly() throws Exception {