@Test
public void shouldParseWithComplexProps() throws Exception {
when(conversionService.fromJson(jsonObject("{\"id\":\"src_id\"}"), same(ManagedObjectRepresentation.class))).thenReturn(managedObject);
JSONObject json = new JSONObject("{\"externalId\":\"some_id\",\"managedObject\":{\"id\":\"src_id\"},\"type\":\"some_type\"}");
ExternalIDRepresentation parsed = (ExternalIDRepresentation) converter.fromJson(json);
assertThat(parsed.getExternalId()).isEqualTo(externalId);
assertThat(parsed.getType()).isEqualTo(type);
assertThat(parsed.getManagedObject()).isSameAs(managedObject);
}