@Test
public void buildRpcReplyError() throws Exception {

    RpcError rpcError = new RpcError();
    rpcError.setErrorTag("error-type");
    rpcError.setErrorInfo(new ErrorInfo());
    rpcError.setErrorMessage("error-message");
    rpcError.setErrorType("error-type");
    String reply = NetconfRpcReplyMessage.buildRpcReplyErrorV10(MESSAGE_ID, rpcError);
    assertTrue(reply.contains(V10));
    assertTrue(reply.contains("error"));
    reply = NetconfRpcReplyMessage.buildRpcReplyErrorV11(MESSAGE_ID, rpcError);
    assertTrue(reply.contains(V11));
    assertTrue(reply.contains("error"));
}