EnvironmentIbatisDao extends SqlMapClientDaoSupport implements EnvironmentDao { @Override public void update(Environment env) { getSqlMapClientTemplate().update("Environment.updateEnv", env); }  @SuppressWarnings("unchecked") @Override List<Environment> findAll(); @Override void delete(int id); @Override int create(Environment env); @Override void update(Environment env); @Override Environment findEnvByID(int id); @Override Environment findPrevEnv(int envId); @Override Environment findEnvByName(String name);  }
@Test public void testUpdate() { Environment environment = environmentDao.findEnvByID(env1Id); String newEnvName = "env_new_name"; String newEnvLabel = "env_new_label"; String newEnvIps = "env_new_ips"; environment.setName(newEnvName); environment.setLabel(newEnvLabel); environment.setIps(newEnvIps); environmentDao.update(environment); environment = environmentDao.findEnvByID(env1Id); assertNotNull(environment); assertEquals(newEnvName, environment.getName()); assertEquals(newEnvLabel, environment.getLabel()); assertEquals(newEnvIps, environment.getIps()); }