### Question:
EthGetProof extends AbstractBlockParameterMethod { @Override public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { return (JsonRpcResponse) findResultByParamType(requestContext); } EthGetProof(final BlockchainQueries blockchain); @Override JsonRpcResponse response(final JsonRpcRequestContext requestContext); @Override String getName();  }### Answer:
@Test public void errorWhenNoAddressAccountSupplied() { final JsonRpcRequestContext request = requestWithParams(null, null, "latest"); thrown.expect(InvalidJsonRpcParameters.class); thrown.expectMessage("Missing required json rpc parameter at index 0"); method.response(request); }
@Test public void errorWhenNoStorageKeysSupplied() { final JsonRpcRequestContext request = requestWithParams(address.toString(), null, "latest"); thrown.expect(InvalidJsonRpcParameters.class); thrown.expectMessage("Missing required json rpc parameter at index 1"); method.response(request); }
@Test public void errorWhenNoBlockNumberSupplied() { final JsonRpcRequestContext request = requestWithParams(address.toString(), new String[] {}); thrown.expect(InvalidJsonRpcParameters.class); thrown.expectMessage("Missing required json rpc parameter at index 2"); method.response(request); }
@Test public void errorWhenAccountNotFound() { generateWorldState(); final JsonRpcErrorResponse expectedResponse = new JsonRpcErrorResponse(null, JsonRpcError.NO_ACCOUNT_FOUND); final JsonRpcRequestContext request = requestWithParams( Address.fromHexString("0x0000000000000000000000000000000000000000"), new String[] {storageKey.toString()}, String.valueOf(blockNumber)); final JsonRpcErrorResponse response = (JsonRpcErrorResponse) method.response(request); assertThat(response).isEqualToComparingFieldByField(expectedResponse); }
@Test public void errorWhenWorldStateUnavailable() { when(blockchainQueries.getWorldState(blockNumber)).thenReturn(Optional.empty()); final JsonRpcErrorResponse expectedResponse = new JsonRpcErrorResponse(null, JsonRpcError.WORLD_STATE_UNAVAILABLE); final JsonRpcRequestContext request = requestWithParams( Address.fromHexString("0x0000000000000000000000000000000000000000"), new String[] {storageKey.toString()}, String.valueOf(blockNumber)); final JsonRpcErrorResponse response = (JsonRpcErrorResponse) method.response(request); assertThat(response).isEqualToComparingFieldByField(expectedResponse); }
@Test public void getProof() { final GetProofResult expectedResponse = generateWorldState(); final JsonRpcRequestContext request = requestWithParams( address.toString(), new String[] {storageKey.toString()}, String.valueOf(blockNumber)); final JsonRpcSuccessResponse response = (JsonRpcSuccessResponse) method.response(request); assertThat(response.getResult()).isEqualToComparingFieldByFieldRecursively(expectedResponse); }