@Test
  void shouldFillGapsBetweenBlockNumbers() {
    // BlockHeader is at block number 1
    // BlockStateCall is at block number 4
    // Should fill gaps between 1 and 4 with block numbers 2 and 3

    BlockStateCall blockStateCall = createBlockStateCall(4L, 1036L);

    List<BlockStateCall> blockStateCalls =
        BlockStateCalls.fillBlockStateCalls(List.of(blockStateCall), mockBlockHeader);
    assertEquals(3, blockStateCalls.size());
    assertEquals(2L, blockStateCalls.get(0).getBlockOverrides().getBlockNumber().orElseThrow());
    assertEquals(1012L, blockStateCalls.get(0).getBlockOverrides().getTimestamp().orElseThrow());
    assertEquals(3L, blockStateCalls.get(1).getBlockOverrides().getBlockNumber().orElseThrow());
    assertEquals(1024L, blockStateCalls.get(1).getBlockOverrides().getTimestamp().orElseThrow());
    assertEquals(4L, blockStateCalls.get(2).getBlockOverrides().getBlockNumber().orElseThrow());
    assertEquals(1036L, blockStateCalls.get(2).getBlockOverrides().getTimestamp().orElseThrow());
  }
Tests that gaps between block numbers are filled correctly when adding a BlockStateCall.
ethereum/core/src/test/java/org/hyperledger/besu/ethereum/transaction/BlockStateCallsTest.java