Accept header not honored when building exception 15/67015/1
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Mon, 17 Sep 2018 13:47:02 +0000 (09:47 -0400)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Mon, 17 Sep 2018 13:47:14 +0000 (09:47 -0400)
commit04c607ef77edb757a43b24c8bff233fad6ede4de
treed889d1770aef252cf18fa76cca042bb87f8bc519
parent618ae3415a0412ba8e49985790c591f6238f7c1b
Accept header not honored when building exception

added accept headers to http entity request
mappers were looking at "Content-Type" and not "Accept"
modified test to no longer share global headers
added additional tests and corrected comparison errors
Fixing issue with comparing media types, the equals method in
MediaType.class uses parameters as well to compare, added a method to
just compare the type and subtype and get done with it
Fixing test failures, getMEdiaType would come as null in most cases,
this causes the defautl serialization mode to be picked which is xml.
tests now pass with exception providers in place
exception providers now handle JSON and XML
Dumy push to re-trigger the build which failed at sonar evaluation
Trying to fix the build by removing different spy's
Returning XML instead of JSON in cases of error for
endpoints. Removed exceptions and its generic handler which is a good
thought, however given that the exceptionhandlers are generic it gets
tough to return to handle exceptions which require different namesaces
in response amongst other problems.

Change-Id: I684fe3b0047693093a99aa999faf261d7713f404
Issue-ID: SO-1058
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapper.java
mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java [deleted file]
mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandlerinfra/exceptions/ApiExceptionMapperTest.java [moved from mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ApiExceptionMapperTest.java with 61% similarity]
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/BaseTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/E2EServiceInstancesTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/HealthCheckHandlerTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ManualTasksTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/OrchestrationRequestsTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/ServiceInstancesTest.java
mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/TasksHandlerTest.java