### Question:
EthGetTransactionByBlockHashAndIndex implements JsonRpcMethod { @Override public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { final Hash hash = requestContext.getRequiredParameter(0, Hash.class); final int index = requestContext.getRequiredParameter(1, UnsignedIntParameter.class).getValue(); final Optional<TransactionWithMetadata> transactionWithMetadata = blockchain.transactionByBlockHashAndIndex(hash, index); final TransactionResult result = transactionWithMetadata.map(TransactionCompleteResult::new).orElse(null); return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), result); } EthGetTransactionByBlockHashAndIndex(final BlockchainQueries blockchain); @Override String getName(); @Override JsonRpcResponse response(final JsonRpcRequestContext requestContext);  }### Answer:
@Test public void shouldReturnNullWhenBlockHashDoesNotExist() { method = new EthGetTransactionByBlockHashAndIndex(blockchain); Bytes32 hash = Hash.keccak256(Bytes.wrap("horse".getBytes(UTF_8))); JsonRpcSuccessResponse response = (JsonRpcSuccessResponse) method.response(request(hash, 1)); assertThat(response.getResult()).isEqualTo(null); }