@Test
public void testDeserialize() throws IOException {

  String jsonString = "{\"id\":\"id\", \"method\":\"method\", \"params\":[]}";
  JsonRpcV1Request request = new JsonRpcV1Request("id", "method");
  assertEquals(
      request, JsonUtil.deserialize(jsonString, JsonRpcV1Request.class)
  );
  String tmpFile = "tempfile";
  Path file = Paths.get(tmpFile);
  Files.write(file, Collections.singletonList(jsonString));
  assertEquals(
      request, JsonUtil.deserialize(file.toUri().toURL(), JsonRpcV1Request.class)
  );
  Files.delete(file);
  assertNull(JsonUtil.deserializeNoException("{}", JsonRpcV1Request.class));
}