@SuppressWarnings("unchecked") @Test(expected = Exception.class) public void test_throwException__FindforCriteria() throws Exception { final List<Object> preparedStatementValues = new ArrayList<>(); final PipeSizeGetRequest pipeSizeGetRequest = new PipeSizeGetRequest(); when(pipeSizeQueryBuilder.getQuery(pipeSizeGetRequest, preparedStatementValues)).thenThrow(Exception.class); final List<PipeSize> pipeSizes = pipeSizeRepository.findForCriteria(pipeSizeGetRequest); assertTrue(pipeSizes != null); }
public List<PipeSize> findForCriteria(final PipeSizeGetRequest pipeSizeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = pipeSizeQueryBuilder.getQuery(pipeSizeGetRequest, preparedStatementValues); final List<PipeSize> pipeSizes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), pipeSizeRowMapper); return pipeSizes; }
PipeSizeRepository { public List<PipeSize> findForCriteria(final PipeSizeGetRequest pipeSizeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = pipeSizeQueryBuilder.getQuery(pipeSizeGetRequest, preparedStatementValues); final List<PipeSize> pipeSizes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), pipeSizeRowMapper); return pipeSizes; } }
PipeSizeRepository { public List<PipeSize> findForCriteria(final PipeSizeGetRequest pipeSizeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = pipeSizeQueryBuilder.getQuery(pipeSizeGetRequest, preparedStatementValues); final List<PipeSize> pipeSizes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), pipeSizeRowMapper); return pipeSizes; }  }
PipeSizeRepository { public List<PipeSize> findForCriteria(final PipeSizeGetRequest pipeSizeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = pipeSizeQueryBuilder.getQuery(pipeSizeGetRequest, preparedStatementValues); final List<PipeSize> pipeSizes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), pipeSizeRowMapper); return pipeSizes; }  PipeSizeRequest create(final PipeSizeRequest pipeSizeRequest); PipeSizeRequest update(final PipeSizeRequest pipeSizeRequest); boolean checkPipeSizeInmmAndCode(final String code, final Double sizeInMilimeter, final String tenantId); List<PipeSize> findForCriteria(final PipeSizeGetRequest pipeSizeGetRequest); }
PipeSizeRepository { public List<PipeSize> findForCriteria(final PipeSizeGetRequest pipeSizeGetRequest) { final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = pipeSizeQueryBuilder.getQuery(pipeSizeGetRequest, preparedStatementValues); final List<PipeSize> pipeSizes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), pipeSizeRowMapper); return pipeSizes; }  PipeSizeRequest create(final PipeSizeRequest pipeSizeRequest); PipeSizeRequest update(final PipeSizeRequest pipeSizeRequest); boolean checkPipeSizeInmmAndCode(final String code, final Double sizeInMilimeter, final String tenantId); List<PipeSize> findForCriteria(final PipeSizeGetRequest pipeSizeGetRequest);  }