    @Test
    public void shouldCalculateBitcoinLikeDifficulty() {

        int previousHeight = 239;
        long previousBlockTime = 1386475638; // Block 239
        long lastRetargetDifficulty = 0x1e0ffff0;
        long lastRetargetTime = 1386474927; // Block 1
        long nextDifficulty = 0x1e00ffff;
        long newDifficulty =
            params.calculateNewDifficultyTargetInner(previousHeight, previousBlockTime,
                lastRetargetDifficulty, lastRetargetTime, nextDifficulty);
        assertEquals(0x1e00ffff, newDifficulty);

        previousHeight = 9599;
        previousBlockTime = 1386954113;
        lastRetargetDifficulty = 0x1c1a1206;
        lastRetargetTime = 1386942008; // Block 9359
        nextDifficulty = 0x1c15ea59;
        newDifficulty =
            params.calculateNewDifficultyTargetInner(previousHeight, previousBlockTime,
                lastRetargetDifficulty, lastRetargetTime, nextDifficulty);
        assertEquals(0x1c15ea59, newDifficulty);
    }