public void serializesPersonEntity() throws IOException, InterruptedException {
PersistentEntity<?, ?> persistentEntity = repositories.getPersistentEntity(Person.class);
Person person = people.save(new Person("John", "Doe"));
PersistentEntityResource resource = PersistentEntityResource.build(person, persistentEntity).//
withLink(new Link("/person/" + person.getId())).build();
StringWriter writer = new StringWriter();
mapper.writeValue(writer, resource);