public static HeightLock ofBlockHeight(int blockHeight) {
        if (blockHeight < 0)
            throw new IllegalArgumentException("illegal negative block height: " + blockHeight);
        if (blockHeight >= THRESHOLD)
            throw new IllegalArgumentException("block height too high: " + blockHeight);
        return new HeightLock(blockHeight);
    }
@Test
    public void blockHeightSubtype() {
        LockTime blockHeight = LockTime.ofBlockHeight(100);
        assertTrue(blockHeight instanceof HeightLock);
        assertTrue(((HeightLock) blockHeight).blockHeight() > 0);
    }