### Question:
Lease { public static Lease expired(UUID tenant) { return new Lease(tenant, 0); } Lease(UUID tenant, long expiry); static Lease vacant(); boolean isVacant(); boolean isHeldBy(UUID candidate); boolean isHeldByAndCurrent(UUID candidate); UUID getTenant(); long getExpiry(); @Override int hashCode(); @Override boolean equals(Object obj); boolean isCurrent(); @Override String toString(); static String formatExpiry(long expiry); byte[] pack(); static Lease unpack(byte[] bytes); static Lease forever(UUID tenant); static Lease expired(UUID tenant);  }### Answer:
@Test public void testExpired() { assertEquals(0, Lease.expired(UUID.randomUUID()).getExpiry()); }