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