- final Response response =
- PostDataTransactionUtil.postData(this.uriInfo, payload, wrapper, this.refSchemaCtx, null, null);
- assertEquals(Response.Status.INTERNAL_SERVER_ERROR, response.getStatusInfo());
+
+ try {
+ PostDataTransactionUtil.postData(this.uriInfo, payload, wrapper, this.refSchemaCtx, null, null);
+ fail("Expected RestconfDocumentedException");
+ } catch (RestconfDocumentedException e) {
+ assertEquals(1, e.getErrors().size());
+ assertTrue(e.getErrors().get(0).getErrorInfo().contains(domException.getMessage()));
+ }
+