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