### Question:
TxPoolBesuTransactions implements JsonRpcMethod { @Override public JsonRpcResponse response(final JsonRpcRequestContext requestContext) { final JsonRpcSuccessResponse jsonRpcSuccessResponse = new JsonRpcSuccessResponse( requestContext.getRequest().getId(), new PendingTransactionsResult(pendingTransactions.getTransactionInfo())); return jsonRpcSuccessResponse; } TxPoolBesuTransactions(final PendingTransactions pendingTransactions); @Override String getName(); @Override JsonRpcResponse response(final JsonRpcRequestContext requestContext);  }### Answer:
@Test public void shouldReturnPendingTransactions() { Instant addedAt = Instant.ofEpochMilli(10_000_000); final JsonRpcRequestContext request = new JsonRpcRequestContext( new JsonRpcRequest( JSON_RPC_VERSION, TXPOOL_PENDING_TRANSACTIONS_METHOD, new Object[] {})); TransactionInfo transactionInfo = mock(TransactionInfo.class); when(transactionInfo.getHash()).thenReturn(Hash.fromHexString(TRANSACTION_HASH)); when(transactionInfo.isReceivedFromLocalSource()).thenReturn(true); when(transactionInfo.getAddedToPoolAt()).thenReturn(addedAt); when(pendingTransactions.getTransactionInfo()).thenReturn(Sets.newHashSet(transactionInfo)); final JsonRpcSuccessResponse actualResponse = (JsonRpcSuccessResponse) method.response(request); final PendingTransactionsResult result = (PendingTransactionsResult) actualResponse.getResult(); final TransactionInfoResult actualTransactionInfo = result.getResults().stream().findFirst().get(); assertThat(actualTransactionInfo.getHash()).isEqualTo(TRANSACTION_HASH); assertThat(actualTransactionInfo.isReceivedFromLocalSource()).isTrue(); assertThat(actualTransactionInfo.getAddedToPoolAt()).isEqualTo(addedAt.toString()); }