@Test public void testJsonDecode() { PersonRepresentation personRepresentation = assertValidates(decodeJson(codec, jsonStructure)); assertThat(personRepresentation.toPerson()).isEqualTo(createPerson("foo@example.com", "Mr Foo")); }
public Person toPerson() { return createPerson(getEmail(), getName()); }
PersonRepresentation { public Person toPerson() { return createPerson(getEmail(), getName()); } }
PersonRepresentation { public Person toPerson() { return createPerson(getEmail(), getName()); }  }
PersonRepresentation { public Person toPerson() { return createPerson(getEmail(), getName()); }  @JsonCreator static PersonRepresentation createPersonRepresentation(String email, String name); Person toPerson(); }
PersonRepresentation { public Person toPerson() { return createPerson(getEmail(), getName()); }  @JsonCreator static PersonRepresentation createPersonRepresentation(String email, String name); Person toPerson();  }