@Test
public void testDifficultyAboveBlock3MShouldTriggerExplosion() throws Exception {

    ByzantiumConfig byzantiumConfig = new ByzantiumConfig(new TestBlockchainConfig());
    int parentDifficulty = 268_435_456;
    BlockHeader parent = new BlockHeaderBuilder(FAKE_HASH, 4_000_000, parentDifficulty).build();
    BlockHeader current = new BlockHeaderBuilder(parent.getHash(), 4_000_001, -1).build();
    int actualDifficulty = byzantiumConfig.calcDifficulty(current, parent).intValue();
    int differenceWithoutExplosion = actualDifficulty - parentDifficulty;
    assertEquals(262_400, differenceWithoutExplosion);
    parent = new BlockHeaderBuilder(FAKE_HASH, 5_000_000, parentDifficulty).build();
    current = new BlockHeaderBuilder(parent.getHash(), 5_000_001, -1).build();
    actualDifficulty = byzantiumConfig.calcDifficulty(current, parent).intValue();
    differenceWithoutExplosion = actualDifficulty - parentDifficulty;
    assertEquals(524_288, differenceWithoutExplosion);
    parent = new BlockHeaderBuilder(FAKE_HASH, 6_000_000, parentDifficulty).build();
    current = new BlockHeaderBuilder(parent.getHash(), 6_000_001, -1).build();
    actualDifficulty = byzantiumConfig.calcDifficulty(current, parent).intValue();
    differenceWithoutExplosion = actualDifficulty - parentDifficulty;
    assertEquals(268_697_600, differenceWithoutExplosion);
}