@Test public void returnedTokenShouldHaveCorrectServerToken() { when(timelock.lock(any())).thenReturn( ConjureLockResponse.successful(SuccessfulLockResponse.of(LOCK_TOKEN, getLease()))); LockResponse lockResponse = lockLeaseService.lock(lockRequest); LeasedLockToken leasedToken = (LeasedLockToken) lockResponse.getToken(); assertThat(leasedToken.serverToken()).isEqualTo(LOCK_TOKEN); }
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);   }