X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2FRestconfDocumentedExceptionMapperTest.java;h=0244aa7f2d58d8692597bf8562364c317346b0f2;hb=2727bea09c83646b6cbd2ef9672d0b7f6cf3b22f;hp=f19bf42c86d4cfdfd32ce93ec99fd54d4008076d;hpb=7f44a5812395762479de68d339c3d017db6c0e9d;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfDocumentedExceptionMapperTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfDocumentedExceptionMapperTest.java index f19bf42c86..0244aa7f2d 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfDocumentedExceptionMapperTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/RestconfDocumentedExceptionMapperTest.java @@ -56,9 +56,11 @@ import org.junit.Ignore; import org.junit.Test; import org.opendaylight.controller.sal.rest.api.Draft02; import org.opendaylight.controller.sal.rest.api.RestconfService; +import org.opendaylight.controller.sal.rest.impl.JsonNormalizedNodeBodyReader; +import org.opendaylight.controller.sal.rest.impl.NormalizedNodeJsonBodyWriter; +import org.opendaylight.controller.sal.rest.impl.NormalizedNodeXmlBodyWriter; import org.opendaylight.controller.sal.rest.impl.RestconfDocumentedExceptionMapper; -import org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider; -import org.opendaylight.controller.sal.rest.impl.StructuredDataToXmlProvider; +import org.opendaylight.controller.sal.rest.impl.XmlNormalizedNodeBodyReader; import org.opendaylight.controller.sal.restconf.impl.ControllerContext; import org.opendaylight.controller.sal.restconf.impl.NormalizedNodeContext; import org.opendaylight.controller.sal.restconf.impl.RestconfDocumentedException; @@ -211,8 +213,8 @@ public class RestconfDocumentedExceptionMapperTest extends JerseyTest { @Override protected Application configure() { ResourceConfig resourceConfig = new ResourceConfig(); - resourceConfig = resourceConfig.registerInstances(mockRestConf, StructuredDataToXmlProvider.INSTANCE, - StructuredDataToJsonProvider.INSTANCE); + resourceConfig = resourceConfig.registerInstances(mockRestConf, new XmlNormalizedNodeBodyReader(), + new JsonNormalizedNodeBodyReader(), new NormalizedNodeJsonBodyWriter(), new NormalizedNodeXmlBodyWriter()); resourceConfig.registerClasses(RestconfDocumentedExceptionMapper.class); return resourceConfig; } @@ -241,6 +243,7 @@ public class RestconfDocumentedExceptionMapperTest extends JerseyTest { testJsonResponse(new RestconfDocumentedException("mock error"), Status.INTERNAL_SERVER_ERROR, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED, "mock error", null, null); + // To test verification code // String json = // "{ errors: {" + @@ -467,7 +470,7 @@ public class RestconfDocumentedExceptionMapperTest extends JerseyTest { testXMLResponse(new RestconfDocumentedException("mock error"), Status.INTERNAL_SERVER_ERROR, ErrorType.APPLICATION, ErrorTag.OPERATION_FAILED, "mock error", null, null); - // To test verification code + // To test verification code // String xml = // ""+ // " " +