AsyncTimelockServiceImpl implements AsyncTimelockService { @Override public boolean isInitialized() { return timestampService.isInitialized(); } AsyncTimelockServiceImpl(
            AsyncLockService lockService,
            ManagedTimestampService timestampService,
            LockLog lockLog); @Override boolean isInitialized(); @Override long getFreshTimestamp(); @Override TimestampRange getFreshTimestamps(int numTimestampsRequested); @Override LockImmutableTimestampResponse lockImmutableTimestamp(IdentifiedTimeLockRequest request); @Override long getImmutableTimestamp(); @Override ListenableFuture<LockResponseV2> lock(IdentifiedLockRequest request); @Override ListenableFuture<WaitForLocksResponse> waitForLocks(WaitForLocksRequest request); @Override ListenableFuture<RefreshLockResponseV2> refreshLockLeases(Set<LockToken> tokens); @Override ListenableFuture<Set<LockToken>> unlock(Set<LockToken> tokens); @Override StartAtlasDbTransactionResponse deprecatedStartTransaction(IdentifiedTimeLockRequest request); @Override StartAtlasDbTransactionResponseV3 startTransaction(
            StartIdentifiedAtlasDbTransactionRequest request); @Override StartTransactionResponseV4 startTransactions(StartTransactionRequestV4 request); @Override ListenableFuture<ConjureStartTransactionsResponse> startTransactionsWithWatches(
            ConjureStartTransactionsRequest request); @Override ListenableFuture<GetCommitTimestampsResponse> getCommitTimestamps(
            int numTimestamps, Optional<LockWatchVersion> lastKnownVersion); @Override ListenableFuture<LeaderTime> leaderTime(); @Override ListenableFuture<TimestampRange> getFreshTimestampsAsync(int timestampsToRequest); @Override long currentTimeMillis(); @Override void fastForwardTimestamp(long currentTimestamp); @Override String ping(); @Override void close(); @Override void startWatching(LockWatchRequest locksToWatch); @Override LockWatchStateUpdate getWatchStateUpdate(Optional<LockWatchVersion> lastKnownVersion); @Override ValueAndLockWatchStateUpdate<T> runTask(Optional<LockWatchVersion> lastKnownVersion, Supplier<T> task); @Override void registerLock(Set<LockDescriptor> locksTakenOut, LockToken token); @Override void registerUnlock(Set<LockDescriptor> locksUnlocked);  }
@Test public void delegatesInitializationCheck() { ManagedTimestampService mockMts = mock(ManagedTimestampService.class); AsyncTimelockServiceImpl service = new AsyncTimelockServiceImpl( mock(AsyncLockService.class), mockMts, mock(LockLog.class)); when(mockMts.isInitialized()) .thenReturn(false) .thenReturn(true); assertFalse(service.isInitialized()); assertTrue(service.isInitialized()); }