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%2FCodecsExceptionsCatchingTest.java;h=307abebdd7b1a37ebfb3cc1d716048614c3e44cc;hb=e3b0eb3bd7f61ab9f54a61d8b8e2d37685262e2c;hp=767aaf36c149a9a61763d71f9e7722f997e9a595;hpb=0b499893a981d06759738e81fa8cb6d098acda80;p=controller.git diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CodecsExceptionsCatchingTest.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CodecsExceptionsCatchingTest.java index 767aaf36c1..307abebdd7 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CodecsExceptionsCatchingTest.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/CodecsExceptionsCatchingTest.java @@ -14,6 +14,7 @@ import org.glassfish.jersey.test.JerseyTest; import org.junit.BeforeClass; import org.junit.Test; import org.opendaylight.controller.sal.rest.impl.JsonToCompositeNodeProvider; +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.XmlToCompositeNodeProvider; @@ -46,6 +47,7 @@ public class CodecsExceptionsCatchingTest extends JerseyTest { resourceConfig = resourceConfig.registerInstances(restConf, StructuredDataToXmlProvider.INSTANCE, StructuredDataToJsonProvider.INSTANCE, XmlToCompositeNodeProvider.INSTANCE, JsonToCompositeNodeProvider.INSTANCE); + resourceConfig.registerClasses( RestconfDocumentedExceptionMapper.class ); return resourceConfig; } @@ -54,6 +56,6 @@ public class CodecsExceptionsCatchingTest extends JerseyTest { Response response = target("/config/number:cont").request(MediaType.APPLICATION_XML).put( Entity.entity("3f", MediaType.APPLICATION_XML)); String exceptionMessage = response.readEntity(String.class); - assertTrue(exceptionMessage.contains("Incorrect lexical representation of Integer value: 3f")); + assertTrue(exceptionMessage.contains("invalid-value")); } } \ No newline at end of file