@Test public void shouldReturnSupplyLineBySupervisoryNodeAndProgram() { Program program = new Program(); SupervisoryNode supervisoryNode = new SupervisoryNode(); when(mapper.getSupplyLineBy(supervisoryNode, program)).thenReturn(supplyLine); SupplyLine returnedSupplyLine = repository.getSupplyLineBy(supervisoryNode, program); verify(mapper).getSupplyLineBy(supervisoryNode, program); assertThat(returnedSupplyLine, is(supplyLine)); }
public SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program) { return mapper.getSupplyLineBy(supervisoryNode, program); }
SupplyLineRepository { public SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program) { return mapper.getSupplyLineBy(supervisoryNode, program); } }
SupplyLineRepository { public SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program) { return mapper.getSupplyLineBy(supervisoryNode, program); }  }
SupplyLineRepository { public SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program) { return mapper.getSupplyLineBy(supervisoryNode, program); }  void insert(SupplyLine supplyLine); SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program); void update(SupplyLine supplyLine); SupplyLine getById(Long id); List<SupplyLine> search(String searchParam, String column, Pagination pagination); Integer getTotalSearchResultCount(String searchParam, String column); List<Facility> getSupplyingFacilities(Long userId); SupplyLine getSupplyLineByFacilityProgram(Long facilityId, Long programId); }
SupplyLineRepository { public SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program) { return mapper.getSupplyLineBy(supervisoryNode, program); }  void insert(SupplyLine supplyLine); SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program); void update(SupplyLine supplyLine); SupplyLine getById(Long id); List<SupplyLine> search(String searchParam, String column, Pagination pagination); Integer getTotalSearchResultCount(String searchParam, String column); List<Facility> getSupplyingFacilities(Long userId); SupplyLine getSupplyLineByFacilityProgram(Long facilityId, Long programId);  }