StubConfigurationOrderService { public void doChange(final int direction, final String groupName, final HttpServletRequest request) throws ClassNotFoundException { routingService.performModification(new ChangeOrderCommand(direction, groupName, request, urlAccessLogMessageAssembler)); }  void doChange(final int direction, final String groupName, final HttpServletRequest request);  }
@Test public void testDoChangeShouldCallTheTwoMethod() throws ClassNotFoundException { underTest.doChange(1, GROUPNAME_FIRST, request); ArgumentCaptor<ChangeOrderCommand> argument = ArgumentCaptor.forClass(ChangeOrderCommand.class); verify(routingService, times(1)).performModification(argument.capture()); Assert.assertEquals(argument.getValue().getDirection(), 1); Assert.assertEquals(argument.getValue().getGroupName(), GROUPNAME_FIRST); Assert.assertEquals(argument.getValue().getRequest(), request); }