@Test public void lockResponseHasCorrectLeasedLock() { Lease lease = getLease(); when(timelock.lock(any())) .thenReturn(ConjureLockResponse.successful(SuccessfulLockResponse.of(LOCK_TOKEN, lease))); LockResponse clientResponse = lockLeaseService.lock(lockRequest); verify(timelock).lock(any()); LeasedLockToken leasedLockToken = (LeasedLockToken) clientResponse.getToken(); assertThat(leasedLockToken.serverToken()).isEqualTo(LOCK_TOKEN); assertThat(leasedLockToken.getLease()).isEqualTo(lease); }
LockResponse lock(LockRequest request) { return lockService.lock(request); }
LockLeaseService { LockResponse lock(LockRequest request) { return lockService.lock(request); } }
LockLeaseService { LockResponse lock(LockRequest request) { return lockService.lock(request); } @VisibleForTesting  LockLeaseService(
            NamespacedConjureTimelockService delegate,
            UUID clientId); }
LockLeaseService { LockResponse lock(LockRequest request) { return lockService.lock(request); } @VisibleForTesting  LockLeaseService(
            NamespacedConjureTimelockService delegate,
            UUID clientId);  }
LockLeaseService { LockResponse lock(LockRequest request) { return lockService.lock(request); } @VisibleForTesting  LockLeaseService(
            NamespacedConjureTimelockService delegate,
            UUID clientId);   }