addSerialFriend(serialTesters.nicki.getId(), serialTesters.michael);
// 1A. Make sure that before we deal with any serialization, we are still operating
// with the expected ManagedFieldAccessorSet class
final Person person = personRepository.findOne(serialTesters.nicki.getId());
assertEquals(ManagedFieldAccessorSet.class, person.getSerialFriends().getClass());
assertEquals(1, person.getSerialFriends().size());
// 1B. Make sure that before we deal with any serialization, we are still operating
// with the expected ManagedPrefixedDynamicProperties class
assertEquals(ManagedPrefixedDynamicProperties.class, person.getPersonalProperties().getClass());
assertEquals(2, person.getPersonalProperties().asMap().size());
assertThat(asCollection(person.getPersonalProperties().getPropertyKeys()), hasItems("addressLine1", "addressLine2"));
// 2. Do Serialization and return serialized object
byte[] bos = serializeIt(person);
return deserializeIt(bos);
}