public void testCopy() {
Person p = (Person)Bo.createNew(Person.class);
p.setName("Jukka");
p.setAge(40);
p.setTs(new Time("21.06.1971"));
assertEquals("Jukka",p.getName());
assertEquals(40,p.getAge());
assertEquals(new Time("21.06.1971"),p.getTs());
UnitOfWork uow = DomainCore.getUnitOfWork();
Family f = (Family)uow.createNewBo(Family.class);
f.setName("Rahkonen");
p.setFamily(f);
assertEquals("Rahkonen",p.getFamily().getName());
print("p: " +p);
Person p2 = (Person)p.copy(p.bi());
assertEquals("Jukka",p2.getName());
assertEquals(40,p2.getAge());
assertEquals(new Time("21.06.1971"),p2.getTs());
assertEquals("Rahkonen",p2.getFamily().getName());
assertNotSame(p,p2);
assertEquals(p,p2); // TODO: should copy be equal to origin?
assertFalse(p == p2);