### Question:
SeasonDataJdbcDao extends JdbcDaoSupport implements SeasonDataDao { @Override public SeasonData fetchByYearAndTeamName(Integer year, String teamName) { SeasonData ret = null; String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ? AND t.team_name = ?"; Object[] args = { year, teamName }; List<SeasonData> results = getJdbcTemplate().query(sql, args, new SeasonDataRowMapper()); if (results.size() > 0) { if (results.size() > 1) { log.warn("Expected 1 result from query, instead got " + results.size() + "!"); } ret = results.get(0); } else { log.warn("Requested team/year combination (" + teamName + "/" + year + ") does not exist in the DB!"); } return ret; } SeasonDataJdbcDao(DataSource dataSource); @Override List<SeasonData> fetchAllByYear(Integer year); @Override SeasonData fetchByYearAndTeamName(Integer year, String teamName);  }### Answer:
@Test public void testFetchByYearAndTeamName_2011() { log.info("*** BEGIN Test ***"); Integer year = 2011; String teamName = "Kentucky"; SeasonData result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertEquals("Kentucky", result.getTeamName()); log.info("*** END Test ***"); }
@Test public void testFetchByYearAndTeamName_2012() { log.info("*** BEGIN Test ***"); Integer year = 2012; String teamName = "Kentucky"; SeasonData result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertEquals("Kentucky", result.getTeamName()); log.info("*** END Test ***"); }
@Test public void testFetchByYearAndTeamName_2013() { log.info("*** BEGIN Test ***"); Integer year = 2013; String teamName = "Kentucky"; SeasonData result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertNull(result); teamName = "Duke"; result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertEquals("Duke", result.getTeamName()); log.info("*** END Test ***"); }
@Test public void testFetchByYearAndTeamName_2014() { log.info("*** BEGIN Test ***"); Integer year = 2014; String teamName = "Kentucky"; SeasonData result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertEquals("Kentucky", result.getTeamName()); log.info("*** END Test ***"); }
@Test public void testFetchByYearAndTeamName_2015() { log.info("*** BEGIN Test ***"); Integer year = 2015; String teamName = "Kentucky"; SeasonData result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertEquals("Kentucky", result.getTeamName()); log.info("*** END Test ***"); }
@Test public void testFetchByYearAndTeamName_2016() { log.info("*** BEGIN Test ***"); Integer year = 2016; String teamName = "Kentucky"; SeasonData result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertEquals("Kentucky", result.getTeamName()); log.info("*** END Test ***"); }
@Test public void testFetchByYearAndTeamName_2017() { log.info("*** BEGIN Test ***"); Integer year = 2017; String teamName = "Kentucky"; SeasonData result = classUnderTest.fetchByYearAndTeamName(year, teamName); assertEquals("Kentucky", result.getTeamName()); log.info("*** END Test ***"); }