Response { public boolean hasError() { return error != null; } Response(); long getId(); void setId(long id); String getJsonrpc(); void setJsonrpc(String jsonrpc); T getResult(); void setResult(T result); Error getError(); void setError(Error error); boolean hasError(); String getRawResponse(); void setRawResponse(String rawResponse); void throwOnError();  }
@Test public void testSendMany_Empty_Transaction() { buildResponse( "{\n" + " \"jsonrpc\": \"2.0\",\n" + " \"id\": 1,\n" + " \"error\": {\n" + " \"code\": -32602,\n" + " \"message\": \"Invalid params\"\n" + " }\n" + "}" ); NeoSendMany sendMany = deserialiseResponse(NeoSendMany.class); assertTrue(sendMany.hasError()); }