### Question:
CustomDataSourceResourceConverter extends ResourceConverterImpl<CustomReportDataSource, ClientCustomDataSource> { protected Map<String, ClientReferenceableFile> convertResourcesToClient(Map<String, ResourceReference> serverResources, ToClientConversionOptions options){ Map<String, ClientReferenceableFile> resources = null; if(serverResources != null && !serverResources.isEmpty()){ resources = new HashMap<String, ClientReferenceableFile>(serverResources.size()); final ResourceReferenceConverter<ClientReferenceableFile> referenceConverter = resourceReferenceConverterProvider.getConverterForType(ClientReferenceableFile.class); for(String key : serverResources.keySet()){ resources.put(key, referenceConverter.toClient(serverResources.get(key), options)); } } return resources; }    }### Answer:
@Test public void convertResourcesToClient_nullSafety(){ assertNull(converter.convertResourcesToClient(null, null)); }
@Test public void convertResourcesToClient(){ final HashMap<String, ResourceReference> serverResources = new HashMap<String, ResourceReference>(); serverResources.put("/uri1", new ResourceReference("/uri1")); serverResources.put("/uri2", new ResourceReference("/uri2")); serverResources.put("/uri3", new ResourceReference("/uri3")); serverResources.put("/uri4", new ResourceReference("/uri4")); serverResources.put("/uri5", new ResourceReference("/uri5")); final Map<String, ClientReferenceableFile> result = converter.convertResourcesToClient(serverResources, ToClientConversionOptions.getDefault()); assertNotNull(result); assertEquals(result.size(), serverResources.size()); for(String key : result.keySet()){ assertEquals(key, result.get(key).getUri()); } }