public void testInsertWithProfileProperties()
{
final long id = 4231L;
TabGroup tg = jpaTabGroupMapper.findById(id);
Person p = new Person("yoyojoe", "Joe", "hey", "Yoyo", "Call Me Joe");
p.setWorkPhone("1234567890");
p.setTitle("Better than you!");
p.setEmail("foo.blah@example.com");
p.setJobDescription("some description!");
p.setAvatarId("avatar");
p.setStartTabGroup(tg);
// phone types not set should return null.
assertNull("Phone types not set should return null", p.getCellPhone());
assertNull("Phone types not set should return null", p.getFax());
p.setCellPhone("5555555555");
p.setFax("4444444444");
jpaPersonMapper.insert(p);
assertTrue("Inserting a Person did not get a positive id.",
jpaPersonMapper.findByAccountId("yoyojoe").getId() > 0);
this.getEntityManager().clear();
Person sut = jpaPersonMapper.findByAccountId("yoyojoe");
assertTrue(sut.getTitle().equals("Better than you!"));
assertTrue(sut.getEmail().equals("foo.blah@example.com"));
assertTrue(sut.getJobDescription().equals("some description!"));
assertTrue("1234567890".equals(sut.getWorkPhone()));
assertTrue("5555555555".equals(sut.getCellPhone()));
assertTrue("4444444444".equals(sut.getFax()));
assertTrue("avatar".equals(sut.getAvatarId()));
assertEquals(id, sut.getStartTabGroup().getId());
}