@Test public void testStoresRpcError() { var error = new RpcError(1, "msg"); assertThat(new RpcException(error).toString(), new BaseMatcher<>() { @Override public boolean matches(Object o) { return o.toString().contains("msg"); } @Override public void describeTo(Description description) { description.appendText("Contains rpcerror"); } }); }
@Override public String toString() { return "RpcException{" + "rpcError=" + rpcError + '}'; }
RpcException extends Exception { @Override public String toString() { return "RpcException{" + "rpcError=" + rpcError + '}'; } }
RpcException extends Exception { @Override public String toString() { return "RpcException{" + "rpcError=" + rpcError + '}'; } RpcException(RpcError rpcError); }
RpcException extends Exception { @Override public String toString() { return "RpcException{" + "rpcError=" + rpcError + '}'; } RpcException(RpcError rpcError); RpcError getRpcError(); @Override String toString(); }
RpcException extends Exception { @Override public String toString() { return "RpcException{" + "rpcError=" + rpcError + '}'; } RpcException(RpcError rpcError); RpcError getRpcError(); @Override String toString();  }