diff options
Diffstat (limited to 'src/test/java/org/onap/dcae/commonFunction/ApiExceptionTest.java')
-rw-r--r-- | src/test/java/org/onap/dcae/commonFunction/ApiExceptionTest.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/test/java/org/onap/dcae/commonFunction/ApiExceptionTest.java b/src/test/java/org/onap/dcae/commonFunction/ApiExceptionTest.java index 0e494030..ef5b477c 100644 --- a/src/test/java/org/onap/dcae/commonFunction/ApiExceptionTest.java +++ b/src/test/java/org/onap/dcae/commonFunction/ApiExceptionTest.java @@ -44,7 +44,7 @@ public class ApiExceptionTest { @Test public void shouldConvertExceptionToBackwardCompatibleFormat() { JSONObject responseBody = ApiException.UNAUTHORIZED_USER.toJSON(); - assertJSONEqual(responseBody, asJSON("" + assertEquals(responseBody.toString(), new JSONObject("" + "{ " + " 'requestError': { " + " 'PolicyException': { " @@ -53,14 +53,7 @@ public class ApiExceptionTest { + " } " + " } " + "} " - )); - } - - private JSONObject asJSON(String jsonString) { - return new JSONObject(jsonString.replace("'", "\"")); - } - - private void assertJSONEqual(JSONObject o1, JSONObject o2) { - assertEquals(o1.toString(), o2.toString()); + .replace("'", "\"") + ).toString()); } } |