@Test public void shouldGetMappingForRequisitionGroupIdAndFacilityId() throws Exception { requisitionGroup.setId(5L); facility.setId(4L); when(requisitionGroupMemberMapper. getMappingByRequisitionGroupIdAndFacilityId(requisitionGroup, facility)). thenReturn(requisitionGroupMember); RequisitionGroupMember returnedRGMember = repository. getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId(requisitionGroup, facility); assertThat(returnedRGMember, is(requisitionGroupMember)); }
public RequisitionGroupMember getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId( RequisitionGroup requisitionGroup, Facility facility) { return mapper.getMappingByRequisitionGroupIdAndFacilityId(requisitionGroup, facility); }
RequisitionGroupMemberRepository { public RequisitionGroupMember getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId( RequisitionGroup requisitionGroup, Facility facility) { return mapper.getMappingByRequisitionGroupIdAndFacilityId(requisitionGroup, facility); } }
RequisitionGroupMemberRepository { public RequisitionGroupMember getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId( RequisitionGroup requisitionGroup, Facility facility) { return mapper.getMappingByRequisitionGroupIdAndFacilityId(requisitionGroup, facility); } @Autowired  RequisitionGroupMemberRepository(RequisitionGroupMemberMapper requisitionGroupMemberMapper); }
RequisitionGroupMemberRepository { public RequisitionGroupMember getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId( RequisitionGroup requisitionGroup, Facility facility) { return mapper.getMappingByRequisitionGroupIdAndFacilityId(requisitionGroup, facility); } @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 RequisitionGroupMember getRequisitionGroupMemberForRequisitionGroupIdAndFacilityId( RequisitionGroup requisitionGroup, Facility facility) { return mapper.getMappingByRequisitionGroupIdAndFacilityId(requisitionGroup, facility); } @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);  }