JsonConverterJEE implements JsonConverter { @Override public String toRpcJson(Object input) { return jsonb().toJson(input); }  @Override void addAdapter(Type type, Object adapter); @Override JsonConverterJEE configure(Properties properties); @Override RpcErrorResponse errorFromJson(String json); @Override RpcResponse<T> responseFromJson(String json, Class<T> resultClass); @Override T fromJson(String json, Class<T> resultClass); @Override String prettyPrint(String json); @Override String toRpcJson(Object input); @Override String toGenericJson(Object object, Type runtimeType); @Override String getName(); static final String NAME; }
@Test public void testPropertiesReqToJson() { String json = CONV.toRpcJson(RpcMethod.PROPERTIES.toRequest()); Assert.assertEquals(PROPERTIES_REQ, json); }
@Test public void testFactomChainHeadReqToJson() { RpcRequest rpcRequest = RpcMethod.CHAIN_HEAD.toRequestBuilder().id(5).param("chainid", "TEST").build(); String json = CONV.toRpcJson(rpcRequest); Assert.assertEquals(CHAINHEAD_REQ, json); }