@Test public void shouldGetAllRequisitionGroupMembersByFacilityId() throws Exception { Long facilityId = 4L; List<RequisitionGroupMember> expectedMembers = asList(new RequisitionGroupMember()); when(requisitionGroupMemberMapper.getAllRequisitionGroupMembersByFacility(facilityId)).thenReturn(expectedMembers); List<RequisitionGroupMember> actualMembers = repository.getAllRequisitionGroupMembersByFacility(facilityId); verify(requisitionGroupMemberMapper).getAllRequisitionGroupMembersByFacility(facilityId); assertThat(actualMembers, is(expectedMembers)); }
public List<RequisitionGroupMember> getAllRequisitionGroupMembersByFacility(Long facilityId) { return mapper.getAllRequisitionGroupMembersByFacility(facilityId); }
RequisitionGroupMemberRepository { public List<RequisitionGroupMember> getAllRequisitionGroupMembersByFacility(Long facilityId) { return mapper.getAllRequisitionGroupMembersByFacility(facilityId); } }
RequisitionGroupMemberRepository { public List<RequisitionGroupMember> getAllRequisitionGroupMembersByFacility(Long facilityId) { return mapper.getAllRequisitionGroupMembersByFacility(facilityId); } @Autowired  RequisitionGroupMemberRepository(RequisitionGroupMemberMapper requisitionGroupMemberMapper); }
RequisitionGroupMemberRepository { public List<RequisitionGroupMember> getAllRequisitionGroupMembersByFacility(Long facilityId) { return mapper.getAllRequisitionGroupMembersByFacility(facilityId); } @Autowired  RequisitionGroupMemberRepository(RequisitionGroupMemberMapper requisitionGroupMemberMapper); void insert(RequisitionGroupMember requisitionGroupMember); List<Long> getRequisitionGroupProgramIdsForFacilityId(Long facilityId); RequisitionGroupMember getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId(
    RequisitionGroup requisitionGroup, Facility facility); void update(RequisitionGroupMember requisitionGroupMember); void removeRequisitionGroupMember(RequisitionGroup requisitionGroup, Facility facility); List<RequisitionGroupMember> getAllRequisitionGroupMembersByFacility(Long facilityId); void updateMembersForVirtualFacilities(Facility parentFacility); void deleteMembersFor(Facility facility); List<RequisitionGroupMember> getMembersBy(Long requisitionGroupId); void deleteMembersForGroup(Long requisitionGroupId); }
RequisitionGroupMemberRepository { public List<RequisitionGroupMember> getAllRequisitionGroupMembersByFacility(Long facilityId) { return mapper.getAllRequisitionGroupMembersByFacility(facilityId); } @Autowired  RequisitionGroupMemberRepository(RequisitionGroupMemberMapper requisitionGroupMemberMapper); void insert(RequisitionGroupMember requisitionGroupMember); List<Long> getRequisitionGroupProgramIdsForFacilityId(Long facilityId); RequisitionGroupMember getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId(
    RequisitionGroup requisitionGroup, Facility facility); void update(RequisitionGroupMember requisitionGroupMember); void removeRequisitionGroupMember(RequisitionGroup requisitionGroup, Facility facility); List<RequisitionGroupMember> getAllRequisitionGroupMembersByFacility(Long facilityId); void updateMembersForVirtualFacilities(Facility parentFacility); void deleteMembersFor(Facility facility); List<RequisitionGroupMember> getMembersBy(Long requisitionGroupId); void deleteMembersForGroup(Long requisitionGroupId);  }