@Test public void shouldGetFulfillmentRolesForUser() throws Exception { Long userId = 1L; List<FulfillmentRoleAssignment> fulfillmentRoleAssignments = asList(new FulfillmentRoleAssignment()); when(fulfillmentRoleAssignmentMapper.getFulfillmentRolesForUser(userId)).thenReturn(fulfillmentRoleAssignments); List<FulfillmentRoleAssignment> expectedFulfillmentRoleAssignments = fulfillmentRoleAssignmentRepository.getFulfillmentRolesForUser(userId); verify(fulfillmentRoleAssignmentMapper).getFulfillmentRolesForUser(userId); assertThat(expectedFulfillmentRoleAssignments, is(fulfillmentRoleAssignments)); }
public List<FulfillmentRoleAssignment> getFulfillmentRolesForUser(Long userId) { return fulfillmentRoleAssignmentMapper.getFulfillmentRolesForUser(userId); }
FulfillmentRoleAssignmentRepository { public List<FulfillmentRoleAssignment> getFulfillmentRolesForUser(Long userId) { return fulfillmentRoleAssignmentMapper.getFulfillmentRolesForUser(userId); } }
FulfillmentRoleAssignmentRepository { public List<FulfillmentRoleAssignment> getFulfillmentRolesForUser(Long userId) { return fulfillmentRoleAssignmentMapper.getFulfillmentRolesForUser(userId); }  }
FulfillmentRoleAssignmentRepository { public List<FulfillmentRoleAssignment> getFulfillmentRolesForUser(Long userId) { return fulfillmentRoleAssignmentMapper.getFulfillmentRolesForUser(userId); }  List<FulfillmentRoleAssignment> getFulfillmentRolesForUser(Long userId); void insertFulfillmentRoles(final User user); List<FulfillmentRoleAssignment> getRolesWithRight(Long userId, String rightName); }
FulfillmentRoleAssignmentRepository { public List<FulfillmentRoleAssignment> getFulfillmentRolesForUser(Long userId) { return fulfillmentRoleAssignmentMapper.getFulfillmentRolesForUser(userId); }  List<FulfillmentRoleAssignment> getFulfillmentRolesForUser(Long userId); void insertFulfillmentRoles(final User user); List<FulfillmentRoleAssignment> getRolesWithRight(Long userId, String rightName);  }