LeaseMaintainerImpl implements LeaseMaintainer, LeaseReconnectListener { @Override public Lease getCurrentLease() { return currentLease.get(); } LeaseMaintainerImpl(LeaseAcquirer leaseAcquirer); @Override Lease getCurrentLease(); @Override void waitForLease(); @Override boolean waitForLease(long timeout, TimeUnit timeUnit); @Override void close(); @Override void reconnecting(); @Override void reconnected(); @Override void destroy();  }
@Test public void currentLeaseBeforeGettingALeaseGivesInvalidLease() throws Exception { Lease lease = leaseMaintainer.getCurrentLease(); assertFalse(lease.isValidAndContiguous(lease)); }