ConfigReleaseIbatisDao extends SqlMapClientDaoSupport implements ConfigReleaseDao { @SuppressWarnings("unchecked") @Override public List<ConfigSetTask> getSetTask(int projectId, int envId, String[] features, String[] keys) { return getSqlMapClientTemplate().queryForList("ConfigRelease.getSetTask", Maps.entry("projectId", projectId).entry("envId", envId) .entry("features", Arrays.asList(features)).entry("keys", Arrays.asList(keys)).get()); }  @Override int createSetTask(ConfigSetTask task); @SuppressWarnings("unchecked") @Override List<ConfigSetTask> getSetTask(int projectId, int envId, String[] features, String[] keys); @Override int createConfigSnapshotSet(ConfigSnapshotSet snapshot); @Override void createConfigSnapshots(List<ConfigSnapshot> configSnapshots); @Override void createConfigInstSnapshots(List<ConfigInstanceSnapshot> configInstSnapshots); @Override ConfigSnapshotSet findSnapshotSetToRollback(int projectId, int envId, String task); @SuppressWarnings("unchecked") @Override List<ConfigSnapshot> findConfigSnapshots(int snapshotSetId); @SuppressWarnings("unchecked") @Override List<ConfigInstanceSnapshot> findConfigInstSnapshots(int snapshotSetId);  }
@Test public void testGetSetTask() { configReleaseDao.createSetTask(buildConfigSetTask()); List<ConfigSetTask> setTasks = configReleaseDao.getSetTask(Project_Foo_Id, Env1_Id, new String[]{Feature_1}, new String[]{Config_Foo1_Key}); assertNotNull(setTasks); assertEquals(1, setTasks.size()); setTasks = configReleaseDao.getSetTask(Project_Foo_Id, Env1_Id, new String[]{Feature_1}, new String[]{Config_Foo2_Key}); assertNotNull(setTasks); assertEquals(1, setTasks.size()); }