@Test public void getMultiplePartitionsRequestsAndMergesMaps() { when(delegate1.get(any())).thenReturn(ImmutableMap.of(1L, 8L, 41L, 48L)); when(delegate2.get(any())).thenReturn(ImmutableMap.of(12L, 28L, 32L, 38L)); assertThat(delegatingTransactionService.get(ImmutableList.of(1L, 12L, 32L, 41L))) .isEqualTo(ImmutableMap.of(1L, 8L, 12L, 28L, 32L, 38L, 41L, 48L)); verifyDelegateHadMultigetCalledWith(delegate1, 1L, 41L); verifyDelegateHadMultigetCalledWith(delegate2, 12L, 32L); }
@CheckForNull @Override public Long get(long startTimestamp) { return AtlasFutures.getUnchecked(getInternal(keyedSyncServices, startTimestamp)); }
SplitKeyDelegatingTransactionService implements TransactionService { @CheckForNull @Override public Long get(long startTimestamp) { return AtlasFutures.getUnchecked(getInternal(keyedSyncServices, startTimestamp)); } }
SplitKeyDelegatingTransactionService implements TransactionService { @CheckForNull @Override public Long get(long startTimestamp) { return AtlasFutures.getUnchecked(getInternal(keyedSyncServices, startTimestamp)); } SplitKeyDelegatingTransactionService(
            Function<Long, T> timestampToServiceKey,
            Map<T, TransactionService> keyedServices); }
SplitKeyDelegatingTransactionService implements TransactionService { @CheckForNull @Override public Long get(long startTimestamp) { return AtlasFutures.getUnchecked(getInternal(keyedSyncServices, startTimestamp)); } SplitKeyDelegatingTransactionService(
            Function<Long, T> timestampToServiceKey,
            Map<T, TransactionService> keyedServices); @CheckForNull @Override Long get(long startTimestamp); @Override Map<Long, Long> get(Iterable<Long> startTimestamps); @Override ListenableFuture<Long> getAsync(long startTimestamp); @Override ListenableFuture<Map<Long, Long>> getAsync(Iterable<Long> startTimestamps); @Override void putUnlessExists(long startTimestamp, long commitTimestamp); @Override void close(); }
SplitKeyDelegatingTransactionService implements TransactionService { @CheckForNull @Override public Long get(long startTimestamp) { return AtlasFutures.getUnchecked(getInternal(keyedSyncServices, startTimestamp)); } SplitKeyDelegatingTransactionService(
            Function<Long, T> timestampToServiceKey,
            Map<T, TransactionService> keyedServices); @CheckForNull @Override Long get(long startTimestamp); @Override Map<Long, Long> get(Iterable<Long> startTimestamps); @Override ListenableFuture<Long> getAsync(long startTimestamp); @Override ListenableFuture<Map<Long, Long>> getAsync(Iterable<Long> startTimestamps); @Override void putUnlessExists(long startTimestamp, long commitTimestamp); @Override void close();  }