public static TimeLock ofTimestamp(Instant time) {
        long secs = time.getEpochSecond();
        if (secs < THRESHOLD)
            throw new IllegalArgumentException("timestamp too low: " + secs);
        return new TimeLock(secs);
    }
@Test
    public void timestampSubtype() {
        LockTime timestamp = LockTime.ofTimestamp(Instant.now());
        assertTrue(timestamp instanceof TimeLock);
        assertTrue(((TimeLock) timestamp).timestamp().isAfter(Instant.EPOCH));
    }