EnvironmentIbatisDao extends SqlMapClientDaoSupport implements EnvironmentDao { @Override public Environment findEnvByID(int id) { return (Environment)getSqlMapClientTemplate().queryForObject("Environment.findByID", id); }  @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 testFindEnvByID() { Environment environment = environmentDao.findEnvByID(env1Id); assertNotNull(environment); assertEquals(Env1_Name, environment.getName()); environment = environmentDao.findEnvByID(-1000); assertNull(environment); }