### Question:
ProjectPathsResult { public boolean addPath( ProjectVersionRef ref, ProjectPath path ){ if ( projects == null ) { projects = new HashMap<>(); } ProjectPaths projectPaths = projects.get( ref ); if ( projectPaths == null ){ projectPaths = new ProjectPaths(); projects.put( ref, projectPaths ); } return projectPaths.addPath( path ); }  Map<ProjectVersionRef, ProjectPaths> getProjects(); void setProjects( Map<ProjectVersionRef, ProjectPaths> projects ); boolean addPath( ProjectVersionRef ref, ProjectPath path ); @Override String toString();  }### Answer:
@Test public void jsonRoundTrip() throws Exception { ProjectPathsResult in = new ProjectPathsResult(); ProjectVersionRef ref = new SimpleProjectVersionRef( "org.foo", "bar", "1" ); in.addPath( ref, new ProjectPath( Collections.singletonList( new SimpleParentRelationship( URI.create( "http: new SimpleProjectVersionRef( "org.dep", "project", "1.1" ) ) ) ) ); ObjectMapper mapper = new ObjectMapper(); mapper.registerModules( new ProjectVersionRefSerializerModule(), new ProjectRelationshipSerializerModule() ); mapper.enable( SerializationFeature.INDENT_OUTPUT ); mapper.configure( JsonParser.Feature.ALLOW_COMMENTS, true ); mapper.setSerializationInclusion( JsonInclude.Include.NON_EMPTY ); String json = mapper.writeValueAsString( in ); Logger logger = LoggerFactory.getLogger( getClass() ); logger.debug( json ); ProjectPathsResult out = mapper.readValue( json, ProjectPathsResult.class ); }