### Question:
DiscoveryRepresentation extends MappingRepresentation { @Override protected void serialize( MappingSerializer serializer ) { uris.forEach( ( key, uri ) -> { if ( uri.isAbsolute() ) { serializer.putAbsoluteUri( key, uri ); } else { serializer.putRelativeUri( key, uri.toString() ); } } ); } DiscoveryRepresentation( DiscoverableURIs uris );   }### Answer:
@Test public void shouldCreateAMapContainingDataAndManagementURIs() throws URISyntaxException { String managementUri = "/management"; String dataUri = "/data"; DiscoveryRepresentation dr = new DiscoveryRepresentation( new DiscoverableURIs.Builder() .add( "management", managementUri, NORMAL ) .add( "data", dataUri, NORMAL ) .add( "bolt", new URI( "bolt: Map<String,Object> mapOfUris = RepresentationTestAccess.serialize( dr ); Object mappedManagementUri = mapOfUris.get( "management" ); Object mappedDataUri = mapOfUris.get( "data" ); Object mappedBoltUri = mapOfUris.get( "bolt" ); assertNotNull( mappedManagementUri ); assertNotNull( mappedDataUri ); assertNotNull( mappedBoltUri ); URI baseUri = RepresentationTestBase.BASE_URI; assertEquals( mappedManagementUri.toString(), Serializer.joinBaseWithRelativePath( baseUri, managementUri ) ); assertEquals( mappedDataUri.toString(), Serializer.joinBaseWithRelativePath( baseUri, dataUri ) ); assertEquals( mappedBoltUri.toString(), "bolt: }