@Test
  public void ethFastSyncingResultIsPresent() throws Exception {
    final SyncStatus testResult =
        new DefaultSyncStatus(1L, 8L, 7L, Optional.of(6L), Optional.of(5L));
    when(synchronizer.getSyncStatus()).thenReturn(Optional.of(testResult));
    final String id = "999";
    final RequestBody body =
        RequestBody.create(
            "{\"jsonrpc\":\"2.0\",\"id\":" + Json.encode(id) + ",\"method\":\"eth_syncing\"}",
            JSON);

    try (final Response resp = client.newCall(buildPostRequest(body)).execute()) {
      final String respBody = resp.body().string();
      final JsonObject json = new JsonObject(respBody);
      final JsonObject result = json.getJsonObject("result");
      final long startingBlock = Long.decode(result.getString("startingBlock"));
      assertThat(startingBlock).isEqualTo(1L);
      final long currentBlock = Long.decode(result.getString("currentBlock"));
      assertThat(currentBlock).isEqualTo(8L);
      final long highestBlock = Long.decode(result.getString("highestBlock"));
      assertThat(highestBlock).isEqualTo(7L);
      final long pulledStates = Long.decode(result.getString("pulledStates"));
      assertThat(pulledStates).isEqualTo(6L);
      final long knownStates = Long.decode(result.getString("knownStates"));
      assertThat(knownStates).isEqualTo(5L);
    }
  }
Tests that empty batch requests are treated as invalid requests as per
http://www.jsonrpc.org/specification#batch.
ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcHttpServiceTest.java