@Test public void shouldGetReportingRoleAssignments() throws Exception { RoleAssignment expected = new RoleAssignment(); when(roleAssignmentRepository.getReportingRole(1L)).thenReturn(expected); RoleAssignment actual = service.getReportingRole(1L); assertThat(actual, is(expected)); }
public RoleAssignment getReportingRole(Long userId) { return roleAssignmentRepository.getReportingRole(userId); }
RoleAssignmentService { public RoleAssignment getReportingRole(Long userId) { return roleAssignmentRepository.getReportingRole(userId); } }
RoleAssignmentService { public RoleAssignment getReportingRole(Long userId) { return roleAssignmentRepository.getReportingRole(userId); }  }
RoleAssignmentService { public RoleAssignment getReportingRole(Long userId) { return roleAssignmentRepository.getReportingRole(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 RoleAssignment getReportingRole(Long userId) { return roleAssignmentRepository.getReportingRole(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);  }