@Test
public void testMyObjectinsertMyObject() {
SqlSession sqlSession = sqlSessionFactory.openSession();
try {
MyObjectMapper mapper = sqlSession.getMapper(MyObjectMapper.class);
MyObject record = new MyObject();
record.setStartDate(new Date());
record.setDecimal100field(10L);
record.setDecimal155field(15.12345);
record.setDecimal60field(6);
FirstName fn = new FirstName();
fn.setValue("Jeff");
record.setFirstname(fn);
record.setId1(1);
record.setId2(2);
record.setLastname("Butler");
MyTime myTime = new MyTime();
myTime.setHours(12);
myTime.setMinutes(34);
myTime.setSeconds(05);
record.setTimefield(myTime);
record.setTimestampfield(new Date());
mapper.insert(record);
MyObjectKey key = new MyObjectKey();
key.setId1(1);
key.setId2(2);
MyObject returnedRecord = mapper.selectByPrimaryKey(key);
assertNotNull(returnedRecord);
assertTrue(datesAreEqual(record.getStartDate(), returnedRecord
.getStartDate()));
assertEquals(record.getDecimal100field(), returnedRecord