- uri = createUri("/operations/", "test-module:rpc-wrongtest");
- assertEquals(404, post(uri, MediaType.APPLICATION_XML, xmlDataRpcInput));
+ List<RpcError> rpcErrors = new ArrayList<>();
+ rpcErrors.add(RpcResultBuilder.newError(ErrorType.RPC, "tag1", "message1", "applicationTag1", "info1", null));
+ rpcErrors.add(RpcResultBuilder.newWarning(ErrorType.PROTOCOL, "tag2", "message2", "applicationTag2", "info2",
+ null));
+ mockInvokeRpc(null, false, rpcErrors);
+ assertEquals(500, post(uri, MediaType.APPLICATION_XML, xmlDataRpcInput));
+
+ uri = "/operations/test-module:rpc-wrongtest";
+ assertEquals(400, post(uri, MediaType.APPLICATION_XML, xmlDataRpcInput));