@Test public void shouldGetFacilityFtpDetailsByFacilityCode() throws Exception { FacilityFtpDetails facilityFtpDetails = mock(FacilityFtpDetails.class); Facility facility = new Facility(); facility.setCode("F10"); facilityFtpDetails.setFacility(facility); when(mapper.getByFacilityId(facility)).thenReturn(facilityFtpDetails); FacilityFtpDetails result = repository.getByFacilityId(facility); assertThat(result, is(facilityFtpDetails)); verify(mapper).getByFacilityId(facility); }
public FacilityFtpDetails getByFacilityId(Facility facility) { return mapper.getByFacilityId(facility); }
FacilityFtpDetailsRepository { public FacilityFtpDetails getByFacilityId(Facility facility) { return mapper.getByFacilityId(facility); } }
FacilityFtpDetailsRepository { public FacilityFtpDetails getByFacilityId(Facility facility) { return mapper.getByFacilityId(facility); }  }
FacilityFtpDetailsRepository { public FacilityFtpDetails getByFacilityId(Facility facility) { return mapper.getByFacilityId(facility); }  void update(FacilityFtpDetails facilityFtpDetails); void insert(FacilityFtpDetails facilityFtpDetails); FacilityFtpDetails getByFacilityId(Facility facility); }
FacilityFtpDetailsRepository { public FacilityFtpDetails getByFacilityId(Facility facility) { return mapper.getByFacilityId(facility); }  void update(FacilityFtpDetails facilityFtpDetails); void insert(FacilityFtpDetails facilityFtpDetails); FacilityFtpDetails getByFacilityId(Facility facility);  }