DefaultWorldpayURIService implements WorldpayURIService { @Override public void extractUrlParamsToMap(final String redirectReferenceUrl, final Map<String, String> params) throws WorldpayException { extractParametersFromUrl(redirectReferenceUrl).forEach(nameValuePair -> params.put(nameValuePair.getName(), nameValuePair.getValue())); }  @Override void extractUrlParamsToMap(final String redirectReferenceUrl, final Map<String, String> params);  }
@Test (expected = WorldpayException.class) public void extractParametersFromUrlThrowsWorldpayExceptionIfIncorrectUrl() throws WorldpayException { testObj.extractUrlParamsToMap(INCORRECT_URL, emptyMap()); }