StubConfigurationStatusService { public void changeStatus(final boolean nextStatus, final String groupName, final HttpServletRequest request) throws ClassNotFoundException { routingService.performModification(new ChangeStatusCommand(nextStatus, groupName, request, urlAccessLogMessageAssembler)); }  void changeStatus(final boolean nextStatus, final String groupName, final HttpServletRequest request);  }
@Test public void testChangeStatusShouldCallTheTwoMethod() throws ClassNotFoundException { underTest.changeStatus(false, GROUPNAME_FIRST, request); ArgumentCaptor<ChangeStatusCommand> argument = ArgumentCaptor.forClass(ChangeStatusCommand.class); verify(routingService, times(1)).performModification(argument.capture()); Assert.assertEquals(argument.getValue().isNextStatus(), false); Assert.assertEquals(argument.getValue().getGroupName(), GROUPNAME_FIRST); Assert.assertEquals(argument.getValue().getRequest(), request); }