@Test
  void shouldRetrieveStateUpdatePostTracingForOneBlock() {

    final Address addressToVerify =
        Address.fromHexString("0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b");

    final long persistedNonceForAccount =
        worldStateArchive.getWorldState().get(addressToVerify).getNonce();

    final long blockNumber = 2;

    final BlockAwareOperationTracer opTracer = mock(BlockAwareOperationTracer.class);

    traceService.trace(
        blockNumber,
        blockNumber,
        worldState -> {
          assertThat(worldState.get(addressToVerify).getNonce()).isEqualTo(1);
        },
        worldState -> {
          assertThat(worldState.get(addressToVerify).getNonce()).isEqualTo(2);
        },
        opTracer);

    assertThat(worldStateArchive.getWorldState().get(addressToVerify).getNonce())
        .isEqualTo(persistedNonceForAccount);

    final Block tracedBlock = blockchain.getBlockByNumber(blockNumber).get();

    verify(opTracer)
        .traceStartBlock(
            tracedBlock.getHeader(), tracedBlock.getBody(), tracedBlock.getHeader().getCoinbase());

    tracedBlock
        .getBody()
        .getTransactions()
        .forEach(
            tx -> {
              verify(opTracer).tracePrepareTransaction(any(), eq(tx));
              verify(opTracer).traceStartTransaction(any(), eq(tx));
              verify(opTracer)
                  .traceEndTransaction(
                      any(), eq(tx), anyBoolean(), any(), any(), anyLong(), any(), anyLong());
            });

    verify(opTracer).traceEndBlock(tracedBlock.getHeader(), tracedBlock.getBody());
  }
The blockchain for testing has a height of 32 and the account
0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b makes a transaction per block. So, in the head, the
nonce of this account should be 32.
app/src/test/java/org/hyperledger/besu/services/TraceServiceImplTest.java