EnvironmentIbatisDao extends SqlMapClientDaoSupport implements EnvironmentDao { @Override public Environment findEnvByName(String name) { return (Environment) getSqlMapClientTemplate().queryForObject("Environment.findByName", name); }  @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 testFindEnvByName() { Environment environment = environmentDao.findEnvByName(Env1_Name); assertNotNull(environment); environment = environmentDao.findEnvByName("no_exists_name"); assertNull(environment); }