@Test public void metadataReadNonCreativeCommonLicenseVideo() throws Exception { Map<String, Object> asset = new HashMap<>(); asset.put(AssetParams.provider.name(), AssetParams.youtube.name()); asset.put(AssetParams.url.name(), "https: Response response = assetManager.metadataRead(asset); assertEquals(ResponseCode.OK.code(), response.getResponseCode().code()); Map<String, Object> metadata = (Map<String, Object>)response.getResult().get(AssetParams.metadata.name()); if (metadata != null && !metadata.isEmpty()) { String license = (String) metadata.get(AssetParams.license.name()); assertFalse(validLicenses.contains(license)); } }
@Override public Response metadataRead(Map<String, Object> asset) { IURLManager urlManager = getURLManager(getProvider(asset)); String url = getUrl(asset); Map<String, Object> metadata = urlManager.readMetadata(url); Response response = new Response(); response.getResult().put("metadata", metadata); return response; }
AssetManagerImpl implements IAssetManager { @Override public Response metadataRead(Map<String, Object> asset) { IURLManager urlManager = getURLManager(getProvider(asset)); String url = getUrl(asset); Map<String, Object> metadata = urlManager.readMetadata(url); Response response = new Response(); response.getResult().put("metadata", metadata); return response; } }
AssetManagerImpl implements IAssetManager { @Override public Response metadataRead(Map<String, Object> asset) { IURLManager urlManager = getURLManager(getProvider(asset)); String url = getUrl(asset); Map<String, Object> metadata = urlManager.readMetadata(url); Response response = new Response(); response.getResult().put("metadata", metadata); return response; }  }
AssetManagerImpl implements IAssetManager { @Override public Response metadataRead(Map<String, Object> asset) { IURLManager urlManager = getURLManager(getProvider(asset)); String url = getUrl(asset); Map<String, Object> metadata = urlManager.readMetadata(url); Response response = new Response(); response.getResult().put("metadata", metadata); return response; }  @Override Response urlValidate(Map<String, Object> asset, String field); @Override Response metadataRead(Map<String, Object> asset); }
AssetManagerImpl implements IAssetManager { @Override public Response metadataRead(Map<String, Object> asset) { IURLManager urlManager = getURLManager(getProvider(asset)); String url = getUrl(asset); Map<String, Object> metadata = urlManager.readMetadata(url); Response response = new Response(); response.getResult().put("metadata", metadata); return response; }  @Override Response urlValidate(Map<String, Object> asset, String field); @Override Response metadataRead(Map<String, Object> asset);  }