diff --git a/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/BaseApi.java b/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/BaseApi.java index 8609931ca..31f830815 100644 --- a/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/BaseApi.java +++ b/opacclient/libopac/src/main/java/de/geeksfactory/opacclient/apis/BaseApi.java @@ -464,7 +464,7 @@ protected JSONObject loadJsonResource(String filename) { * @param myURL the URL to clean * @return cleaned URL */ - public static String cleanUrl(String myURL) { + public String cleanUrl(String myURL) { String[] parts = myURL.split("\\?"); String url = parts[0]; try { diff --git a/opacclient/libopac/src/test/java/de/geeksfactory/opacclient/apis/ApacheBaseApiTest.java b/opacclient/libopac/src/test/java/de/geeksfactory/opacclient/apis/ApacheBaseApiTest.java index e6ed1426b..5340a3fe9 100644 --- a/opacclient/libopac/src/test/java/de/geeksfactory/opacclient/apis/ApacheBaseApiTest.java +++ b/opacclient/libopac/src/test/java/de/geeksfactory/opacclient/apis/ApacheBaseApiTest.java @@ -3,6 +3,7 @@ import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.junit.Test; +import org.mockito.Mockito; import java.util.Arrays; @@ -12,10 +13,11 @@ public class ApacheBaseApiTest { @Test - public void cleanUrlShouldHandleMultipleEqualsSigns() throws Exception { + public void cleanUrlShouldHandleMultipleEqualsSigns() { + BaseApi baseApi = Mockito.mock(BaseApi.class, Mockito.CALLS_REAL_METHODS); String url = "http://www.example.com/file?param1=value=1¶m=value2"; assertEquals("http://www.example.com/file?param1=value%3D1¶m=value2", - ApacheBaseApi.cleanUrl(url)); + baseApi.cleanUrl(url)); } @Test