@Test public final void test_search() { List<SurrenderReason> surrenderReasons = getSurrenderReasons(); SurrenderReasonSearch surrenderReasonSearch = new SurrenderReasonSearch(); Pagination<SurrenderReason> expextedResult = new Pagination<>(); expextedResult.setPagedData(surrenderReasons); when(surrenderReasonRepository.search(surrenderReasonSearch)).thenReturn(expextedResult); Pagination<SurrenderReason> actualResult = surrenderReasonService.search(surrenderReasonSearch); assertEquals(expextedResult, actualResult); }
public Pagination<SurrenderReason> search(SurrenderReasonSearch surrenderReasonSearch) { return surrenderReasonRepository.search(surrenderReasonSearch); }
SurrenderReasonService { public Pagination<SurrenderReason> search(SurrenderReasonSearch surrenderReasonSearch) { return surrenderReasonRepository.search(surrenderReasonSearch); } }
SurrenderReasonService { public Pagination<SurrenderReason> search(SurrenderReasonSearch surrenderReasonSearch) { return surrenderReasonRepository.search(surrenderReasonSearch); } @Autowired  SurrenderReasonService(SmartValidator validator, SurrenderReasonRepository surrenderReasonRepository); }
SurrenderReasonService { public Pagination<SurrenderReason> search(SurrenderReasonSearch surrenderReasonSearch) { return surrenderReasonRepository.search(surrenderReasonSearch); } @Autowired  SurrenderReasonService(SmartValidator validator, SurrenderReasonRepository surrenderReasonRepository); @Transactional List<SurrenderReason> create(List<SurrenderReason> surrenderReasons, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<SurrenderReason> update(List<SurrenderReason> surrenderReasons, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<SurrenderReason> delete(List<SurrenderReason> surrenderReasons, BindingResult errors,
            RequestInfo requestInfo); @Transactional SurrenderReason delete(SurrenderReason surrenderReason); List<SurrenderReason> fetchRelated(List<SurrenderReason> surrenderreasons); Pagination<SurrenderReason> search(SurrenderReasonSearch surrenderReasonSearch); @Transactional SurrenderReason save(SurrenderReason surrenderReason); @Transactional SurrenderReason update(SurrenderReason surrenderReason); }
SurrenderReasonService { public Pagination<SurrenderReason> search(SurrenderReasonSearch surrenderReasonSearch) { return surrenderReasonRepository.search(surrenderReasonSearch); } @Autowired  SurrenderReasonService(SmartValidator validator, SurrenderReasonRepository surrenderReasonRepository); @Transactional List<SurrenderReason> create(List<SurrenderReason> surrenderReasons, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<SurrenderReason> update(List<SurrenderReason> surrenderReasons, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<SurrenderReason> delete(List<SurrenderReason> surrenderReasons, BindingResult errors,
            RequestInfo requestInfo); @Transactional SurrenderReason delete(SurrenderReason surrenderReason); List<SurrenderReason> fetchRelated(List<SurrenderReason> surrenderreasons); Pagination<SurrenderReason> search(SurrenderReasonSearch surrenderReasonSearch); @Transactional SurrenderReason save(SurrenderReason surrenderReason); @Transactional SurrenderReason update(SurrenderReason surrenderReason); static final String ACTION_CREATE; static final String ACTION_UPDATE; static final String ACTION_DELETE; static final String ACTION_VIEW; static final String ACTION_EDIT; static final String ACTION_SEARCH; }