Report ServerException from ChildBody.toPayload()
[netconf.git] / restconf / restconf-nb / src / test / java / org / opendaylight / restconf / server / spi / NC1265Test.java
index 495f196efcd59ceb0ef4637868f0f93979b6b76e..90b6a7b40f98126805b17b60c0325b075b127e92 100644 (file)
@@ -131,7 +131,9 @@ class NC1265Test {
 
     private static ServerError assertRestconfError(final String apiPath) {
         final var parsed = assertApiPath(apiPath);
-        return assertThrows(ServerException.class, () -> NORMALIZER.normalizeDataPath(parsed)).error();
+        final var errors = assertThrows(ServerException.class, () -> NORMALIZER.normalizeDataPath(parsed)).errors();
+        assertEquals(1, errors.size());
+        return errors.get(0);
     }
 
     private static ApiPath assertApiPath(final String apiPath) {