@Test public void lockAcquireTimeoutIsBoundedAndRequestRetried() { when(lockRequest.getAcquireTimeoutMs()).thenReturn(TIMEOUT_GREATER_THAN_MAX_PERMISSIBLE_TIMEOUT.toMillis()); when(timelock.lock(any())) .thenThrow(TIMEOUT_EXCEPTION) .thenReturn(ConjureLockResponse.successful(SuccessfulLockResponse.of(LOCK_TOKEN, getLease()))); LockResponse lockResponse = lockLeaseService.lock(lockRequest); assertValid(lockResponse.getToken()); verify(timelock, times(2)).lock(any()); }
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);   }