From da3a0ffd66b14e450f648bfe3737f3c933280087 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Wed, 15 May 2024 16:25:00 +0200 Subject: Do not use an exception to communicate an ok response in the /echo endpoint - do not use an AAIException to return a 200 OK response Issue-ID: AAI-3847 Change-Id: I29b20bb408fa55d5a18ab4e1981d7c2c435410a4 Signed-off-by: Fiete Ostkamp --- .../test/java/org/onap/aai/rest/util/EchoResponseTest.java | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'aai-resources/src/test') diff --git a/aai-resources/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java b/aai-resources/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java index f754449c..030e870a 100644 --- a/aai-resources/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java +++ b/aai-resources/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java @@ -123,17 +123,6 @@ public class EchoResponseTest extends AAISetup { assertEquals(Response.Status.BAD_REQUEST.getStatusCode(), response.getStatus()); } - @Test - public void testEchoResultWhenValidHeadersButMediaTypeWrong() { - - when(httpHeaders.getAcceptableMediaTypes()).thenThrow(new IllegalStateException()).thenReturn(outputMediaTypes); - - Response response = echoResponse.echoResult(httpHeaders, null, ""); - - assertNotNull(response); - assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus()); - } - @Test public void testCheckDbAction_CachedSuccess() { // Prepare -- cgit