@Test public void test_Should_Find_Escalation_Valid() { final List<Object> preparedStatementValues = new ArrayList<>(); final EscalationTimeTypeGetReq receivingCenterGetReq = Mockito.mock(EscalationTimeTypeGetReq.class); final String queryString = "MyQuery"; when(escalationQueryBuilder.getQuery(receivingCenterGetReq, preparedStatementValues)).thenReturn(queryString); final List<EscalationTimeType> connectionCategories = new ArrayList<>(); when(jdbcTemplate.query(queryString, preparedStatementValues.toArray(), escalationRowMapper)) .thenReturn(connectionCategories); assertTrue( connectionCategories.equals(escalationRepository.getAllEscalationTimeTypes(receivingCenterGetReq))); }
public List<EscalationTimeType> getAllEscalationTimeTypes(final EscalationTimeTypeGetReq escalationGetRequest) { LOGGER.info("EscalationTimeType search Request::" + escalationGetRequest); final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = escalationTimeTypeQueryBuilder.getQuery(escalationGetRequest, preparedStatementValues); final List<EscalationTimeType> escalationTypes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), escalationRowMapper); return escalationTypes; }
EscalationTimeTypeRepository { public List<EscalationTimeType> getAllEscalationTimeTypes(final EscalationTimeTypeGetReq escalationGetRequest) { LOGGER.info("EscalationTimeType search Request::" + escalationGetRequest); final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = escalationTimeTypeQueryBuilder.getQuery(escalationGetRequest, preparedStatementValues); final List<EscalationTimeType> escalationTypes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), escalationRowMapper); return escalationTypes; } }
EscalationTimeTypeRepository { public List<EscalationTimeType> getAllEscalationTimeTypes(final EscalationTimeTypeGetReq escalationGetRequest) { LOGGER.info("EscalationTimeType search Request::" + escalationGetRequest); final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = escalationTimeTypeQueryBuilder.getQuery(escalationGetRequest, preparedStatementValues); final List<EscalationTimeType> escalationTypes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), escalationRowMapper); return escalationTypes; }  }
EscalationTimeTypeRepository { public List<EscalationTimeType> getAllEscalationTimeTypes(final EscalationTimeTypeGetReq escalationGetRequest) { LOGGER.info("EscalationTimeType search Request::" + escalationGetRequest); final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = escalationTimeTypeQueryBuilder.getQuery(escalationGetRequest, preparedStatementValues); final List<EscalationTimeType> escalationTypes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), escalationRowMapper); return escalationTypes; }  EscalationTimeTypeReq persistCreateEscalationTimeType(final EscalationTimeTypeReq escalationTimeTypeRequest); List<EscalationTimeType> getAllEscalationTimeTypes(final EscalationTimeTypeGetReq escalationGetRequest); EscalationTimeTypeReq persistUpdateEscalationTimeType(final EscalationTimeTypeReq escalationTimeTypeRequest); }
EscalationTimeTypeRepository { public List<EscalationTimeType> getAllEscalationTimeTypes(final EscalationTimeTypeGetReq escalationGetRequest) { LOGGER.info("EscalationTimeType search Request::" + escalationGetRequest); final List<Object> preparedStatementValues = new ArrayList<>(); final String queryStr = escalationTimeTypeQueryBuilder.getQuery(escalationGetRequest, preparedStatementValues); final List<EscalationTimeType> escalationTypes = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), escalationRowMapper); return escalationTypes; }  EscalationTimeTypeReq persistCreateEscalationTimeType(final EscalationTimeTypeReq escalationTimeTypeRequest); List<EscalationTimeType> getAllEscalationTimeTypes(final EscalationTimeTypeGetReq escalationGetRequest); EscalationTimeTypeReq persistUpdateEscalationTimeType(final EscalationTimeTypeReq escalationTimeTypeRequest); static final Logger LOGGER; }