@Test public void test_Should_Find_CategoryType_Valid() { final List<Object> preparedStatementValues = new ArrayList<>(); final GapcodeGetRequest gapcodeGetRequest = Mockito .mock(GapcodeGetRequest.class); final String queryString = "MyQuery"; when( gapcodeQueryBuilder.getQuery(gapcodeGetRequest, preparedStatementValues)).thenReturn(queryString); final List<Gapcode> connectionCategories = new ArrayList<>(); when( jdbcTemplate.query(queryString, preparedStatementValues.toArray(), gapcodeRowMapper)) .thenReturn(connectionCategories); assertTrue(connectionCategories.equals(gapcodeRepository .findForCriteria(gapcodeGetRequest))); }
public List<Gapcode> findForCriteria( final GapcodeGetRequest gapcodeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = gapcodeQueryBuilder.getQuery(gapcodeGetRequest, preparedStatementValues); log.info(queryStr); final List<Gapcode> gapcode = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), gapcodeRowMapper); return gapcode; }
GapcodeRepository { public List<Gapcode> findForCriteria( final GapcodeGetRequest gapcodeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = gapcodeQueryBuilder.getQuery(gapcodeGetRequest, preparedStatementValues); log.info(queryStr); final List<Gapcode> gapcode = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), gapcodeRowMapper); return gapcode; } }
GapcodeRepository { public List<Gapcode> findForCriteria( final GapcodeGetRequest gapcodeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = gapcodeQueryBuilder.getQuery(gapcodeGetRequest, preparedStatementValues); log.info(queryStr); final List<Gapcode> gapcode = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), gapcodeRowMapper); return gapcode; }  }
GapcodeRepository { public List<Gapcode> findForCriteria( final GapcodeGetRequest gapcodeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = gapcodeQueryBuilder.getQuery(gapcodeGetRequest, preparedStatementValues); log.info(queryStr); final List<Gapcode> gapcode = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), gapcodeRowMapper); return gapcode; }  GapcodeRequest create(final GapcodeRequest gapcodeRequest); GapcodeRequest update(final GapcodeRequest gapcodeRequest); List<Gapcode> findForCriteria(
            final GapcodeGetRequest gapcodeGetRequest); List<CommonDataModel> getFormulaQuery(); }
GapcodeRepository { public List<Gapcode> findForCriteria( final GapcodeGetRequest gapcodeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = gapcodeQueryBuilder.getQuery(gapcodeGetRequest, preparedStatementValues); log.info(queryStr); final List<Gapcode> gapcode = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), gapcodeRowMapper); return gapcode; }  GapcodeRequest create(final GapcodeRequest gapcodeRequest); GapcodeRequest update(final GapcodeRequest gapcodeRequest); List<Gapcode> findForCriteria(
            final GapcodeGetRequest gapcodeGetRequest); List<CommonDataModel> getFormulaQuery();  }