@Test public void shouldGetFulfilmentRolesForUser() throws Exception { List<FulfillmentRoleAssignment> expectedRoleAssignments = new ArrayList<>(); when(fulfillmentRoleService.getRolesForUser(2l)).thenReturn(expectedRoleAssignments); List<FulfillmentRoleAssignment> fulfilmentRoles = service.getFulfilmentRoles(2l); assertThat(fulfilmentRoles, is(expectedRoleAssignments)); }
public List<FulfillmentRoleAssignment> getFulfilmentRoles(Long userId) { return fulfillmentRoleService.getRolesForUser(userId); }
RoleAssignmentService { public List<FulfillmentRoleAssignment> getFulfilmentRoles(Long userId) { return fulfillmentRoleService.getRolesForUser(userId); } }
RoleAssignmentService { public List<FulfillmentRoleAssignment> getFulfilmentRoles(Long userId) { return fulfillmentRoleService.getRolesForUser(userId); }  }
RoleAssignmentService { public List<FulfillmentRoleAssignment> getFulfilmentRoles(Long userId) { return fulfillmentRoleService.getRolesForUser(userId); }  List<RoleAssignment> getHomeFacilityRoles(Long userId); RoleAssignment getAdminRole(Long userId); RoleAssignment getReportRole(Long userId); List<RoleAssignment> getSupervisorRoles(Long userId); List<RoleAssignment> getAllocationRoles(Long userId); List<RoleAssignment> getHomeFacilityRolesForUserOnGivenProgramWithRights(Long userId, Long programId, String... rightNames); List<RoleAssignment> getRoleAssignments(String rightName, Long userId); void saveRolesForUser(User user); List<FulfillmentRoleAssignment> getFulfilmentRoles(Long userId); List<FulfillmentRoleAssignment> getFulfilmentRolesWithRight(Long userId, String rightName); RoleAssignment getReportingRole(Long userId); }
RoleAssignmentService { public List<FulfillmentRoleAssignment> getFulfilmentRoles(Long userId) { return fulfillmentRoleService.getRolesForUser(userId); }  List<RoleAssignment> getHomeFacilityRoles(Long userId); RoleAssignment getAdminRole(Long userId); RoleAssignment getReportRole(Long userId); List<RoleAssignment> getSupervisorRoles(Long userId); List<RoleAssignment> getAllocationRoles(Long userId); List<RoleAssignment> getHomeFacilityRolesForUserOnGivenProgramWithRights(Long userId, Long programId, String... rightNames); List<RoleAssignment> getRoleAssignments(String rightName, Long userId); void saveRolesForUser(User user); List<FulfillmentRoleAssignment> getFulfilmentRoles(Long userId); List<FulfillmentRoleAssignment> getFulfilmentRolesWithRight(Long userId, String rightName); RoleAssignment getReportingRole(Long userId);  }