@Test public void validateLicenseWithNoProvider() throws Exception { Map<String, Object> asset = new HashMap<>(); asset.put(AssetParams.provider.name(), ""); asset.put(AssetParams.url.name(), "https: try { assetManager.urlValidate(asset, "license"); } catch (ClientException e) { assertEquals(ResponseCode.CLIENT_ERROR.code(), e.getResponseCode().code()); assertEquals(ErrMsg.SPECIFY_PROVIDER.value(), e.getMessage()); } }
@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);  }