@Test public void test_findForCriteria() { final Map<String, List<String>> expectedAssetConfigurationMap = getAssetConfigurationMap(); final AssetConfigurationCriteria assetConfigurationCriteria = getAssetConfigurationCriteria(); when(jdbcTemplate.query(any(String.class), any(Object[].class), any(AssetConfigurationKeyValuesRowMapper.class))).thenReturn(expectedAssetConfigurationMap); final Map<String, List<String>> actualAssetConfigurationMap = assetConfigurationRepository .findForCriteria(assetConfigurationCriteria); assertEquals(expectedAssetConfigurationMap.toString(), actualAssetConfigurationMap.toString()); }
public Map<String, List<String>> findForCriteria(final AssetConfigurationCriteria assetConfigurationCriteria) { final List<Object> preparedStatementValues = new ArrayList<Object>(); final String queryStr = assetConfigurationQueryBuilder.getQuery(assetConfigurationCriteria, preparedStatementValues); final Map<String, List<String>> assetConfigurationKeyValues = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), assetConfigurationKeyValuesRowMapper); return assetConfigurationKeyValues; }
AssetConfigurationRepository { public Map<String, List<String>> findForCriteria(final AssetConfigurationCriteria assetConfigurationCriteria) { final List<Object> preparedStatementValues = new ArrayList<Object>(); final String queryStr = assetConfigurationQueryBuilder.getQuery(assetConfigurationCriteria, preparedStatementValues); final Map<String, List<String>> assetConfigurationKeyValues = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), assetConfigurationKeyValuesRowMapper); return assetConfigurationKeyValues; } }
AssetConfigurationRepository { public Map<String, List<String>> findForCriteria(final AssetConfigurationCriteria assetConfigurationCriteria) { final List<Object> preparedStatementValues = new ArrayList<Object>(); final String queryStr = assetConfigurationQueryBuilder.getQuery(assetConfigurationCriteria, preparedStatementValues); final Map<String, List<String>> assetConfigurationKeyValues = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), assetConfigurationKeyValuesRowMapper); return assetConfigurationKeyValues; }  }
AssetConfigurationRepository { public Map<String, List<String>> findForCriteria(final AssetConfigurationCriteria assetConfigurationCriteria) { final List<Object> preparedStatementValues = new ArrayList<Object>(); final String queryStr = assetConfigurationQueryBuilder.getQuery(assetConfigurationCriteria, preparedStatementValues); final Map<String, List<String>> assetConfigurationKeyValues = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), assetConfigurationKeyValuesRowMapper); return assetConfigurationKeyValues; }  Map<String, List<String>> findForCriteria(final AssetConfigurationCriteria assetConfigurationCriteria); }
AssetConfigurationRepository { public Map<String, List<String>> findForCriteria(final AssetConfigurationCriteria assetConfigurationCriteria) { final List<Object> preparedStatementValues = new ArrayList<Object>(); final String queryStr = assetConfigurationQueryBuilder.getQuery(assetConfigurationCriteria, preparedStatementValues); final Map<String, List<String>> assetConfigurationKeyValues = jdbcTemplate.query(queryStr, preparedStatementValues.toArray(), assetConfigurationKeyValuesRowMapper); return assetConfigurationKeyValues; }  Map<String, List<String>> findForCriteria(final AssetConfigurationCriteria assetConfigurationCriteria);  }