@Test
public void testEnum() {
SqlSession sqlSession = sqlSessionFactory.openSession();
try {
EnumtestMapper mapper = sqlSession.getMapper(EnumtestMapper.class);
Enumtest enumTest = new Enumtest();
enumTest.setId(1);
enumTest.setName(TestEnum.FRED);
int rows = mapper.insert(enumTest);
assertEquals(1, rows);
List<Enumtest> returnedRecords = mapper.selectByExample(null);
assertEquals(1, returnedRecords.size());
Enumtest returnedRecord = returnedRecords.get(0);
assertEquals(1, returnedRecord.getId().intValue());
assertEquals(TestEnum.FRED, returnedRecord.getName());