@Test public void validateLicenseNonCreativeCommonsYouTubeLicense() 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.urlValidate(asset, "license"); assertEquals(ResponseCode.OK.code(), response.getResponseCode().code()); Map<String, Object> license = (Map<String, Object>)response.getResult().get(LICENSE); assertFalse( (boolean)license.get(VALID) ); assertFalse(validLicenses.contains((String)license.get(VALUE))); }
@Override public Response urlValidate(Map<String, Object> asset, String field) { IURLManager urlManager = getURLManager(getProvider(asset)); Map<String, Object> fieldMap = urlManager.validateURL(getUrl(asset), field); Response response = new Response(); response.getResult().put(field, fieldMap); return response; }
AssetManagerImpl implements IAssetManager { @Override public Response urlValidate(Map<String, Object> asset, String field) { IURLManager urlManager = getURLManager(getProvider(asset)); Map<String, Object> fieldMap = urlManager.validateURL(getUrl(asset), field); Response response = new Response(); response.getResult().put(field, fieldMap); return response; } }
AssetManagerImpl implements IAssetManager { @Override public Response urlValidate(Map<String, Object> asset, String field) { IURLManager urlManager = getURLManager(getProvider(asset)); Map<String, Object> fieldMap = urlManager.validateURL(getUrl(asset), field); Response response = new Response(); response.getResult().put(field, fieldMap); return response; }  }
AssetManagerImpl implements IAssetManager { @Override public Response urlValidate(Map<String, Object> asset, String field) { IURLManager urlManager = getURLManager(getProvider(asset)); Map<String, Object> fieldMap = urlManager.validateURL(getUrl(asset), field); Response response = new Response(); response.getResult().put(field, fieldMap); return response; }  @Override Response urlValidate(Map<String, Object> asset, String field); @Override Response metadataRead(Map<String, Object> asset); }
AssetManagerImpl implements IAssetManager { @Override public Response urlValidate(Map<String, Object> asset, String field) { IURLManager urlManager = getURLManager(getProvider(asset)); Map<String, Object> fieldMap = urlManager.validateURL(getUrl(asset), field); Response response = new Response(); response.getResult().put(field, fieldMap); return response; }  @Override Response urlValidate(Map<String, Object> asset, String field); @Override Response metadataRead(Map<String, Object> asset);  }