@Test public void testFindForCriteria() { List<TaxHeadMaster> taxHeadMaster = new ArrayList<>(); taxHeadMaster.add(getTaxHeadMaster()); String query =""; when(taxHeadMasterQueryBuilder.getQuery(new TaxHeadMasterCriteria(),new ArrayList<>())).thenReturn(query); when(jdbcTemplate.query(any(String.class), any(Object[].class), any(TaxHeadMasterRowMapper.class))).thenReturn(taxHeadMaster); assertTrue(taxHeadMaster.equals(taxHeadMasterRepository.findForCriteria(new TaxHeadMasterCriteria()))); }
public List<TaxHeadMaster> findForCriteria(TaxHeadMasterCriteria taxHeadMasterCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = taxHeadMasterQueryBuilder.getQuery(taxHeadMasterCriteria, preparedStatementValues); return jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), taxHeadMasterRowMapper); }
TaxHeadMasterRepository { public List<TaxHeadMaster> findForCriteria(TaxHeadMasterCriteria taxHeadMasterCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = taxHeadMasterQueryBuilder.getQuery(taxHeadMasterCriteria, preparedStatementValues); return jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), taxHeadMasterRowMapper); } }
TaxHeadMasterRepository { public List<TaxHeadMaster> findForCriteria(TaxHeadMasterCriteria taxHeadMasterCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = taxHeadMasterQueryBuilder.getQuery(taxHeadMasterCriteria, preparedStatementValues); return jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), taxHeadMasterRowMapper); }  }
TaxHeadMasterRepository { public List<TaxHeadMaster> findForCriteria(TaxHeadMasterCriteria taxHeadMasterCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = taxHeadMasterQueryBuilder.getQuery(taxHeadMasterCriteria, preparedStatementValues); return jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), taxHeadMasterRowMapper); }  List<TaxHeadMaster> findForCriteria(TaxHeadMasterCriteria taxHeadMasterCriteria); List<TaxHeadMaster> getTaxHeadMaster(RequestInfo requestInfo, TaxHeadMasterCriteria taxHeadMasterCriteria); @Transactional List<TaxHeadMaster> create(TaxHeadMasterRequest taxHeadMasterRequest); @Transactional List<TaxHeadMaster> update(TaxHeadMasterRequest taxHeadMasterRequest); }
TaxHeadMasterRepository { public List<TaxHeadMaster> findForCriteria(TaxHeadMasterCriteria taxHeadMasterCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String queryStr = taxHeadMasterQueryBuilder.getQuery(taxHeadMasterCriteria, preparedStatementValues); return jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), taxHeadMasterRowMapper); }  List<TaxHeadMaster> findForCriteria(TaxHeadMasterCriteria taxHeadMasterCriteria); List<TaxHeadMaster> getTaxHeadMaster(RequestInfo requestInfo, TaxHeadMasterCriteria taxHeadMasterCriteria); @Transactional List<TaxHeadMaster> create(TaxHeadMasterRequest taxHeadMasterRequest); @Transactional List<TaxHeadMaster> update(TaxHeadMasterRequest taxHeadMasterRequest);  }