### Question:
EthBlockNumber implements JsonRpcMethod { @Override public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { final long value = blockchain.get().headBlockNumber(); return new JsonRpcSuccessResponse( requestContext.getRequest().getId(), resultAsInteger ? value : Quantity.create(value)); } EthBlockNumber(final BlockchainQueries blockchain);  EthBlockNumber(
      final Supplier<BlockchainQueries> blockchain, final boolean resultAsInteger); @Override String getName(); @Override JsonRpcResponse response(final JsonRpcRequestContext requestContext);  }### Answer:
@Test public void shouldReturnCorrectResult() { final long headBlockNumber = 123456L; when(blockchainQueries.headBlockNumber()).thenReturn(headBlockNumber); final JsonRpcRequestContext request = new JsonRpcRequestContext( new JsonRpcRequest(JSON_RPC_VERSION, ETH_METHOD, new Object[] {})); final JsonRpcResponse expected = new JsonRpcSuccessResponse(request.getRequest().getId(), Quantity.create(headBlockNumber)); final JsonRpcResponse actual = method.response(request); assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected); }