use of com.palantir.lock.v2.RefreshLockResponseV2 in project atlasdb by palantir.
the class AtlasBackupResourceTest method refreshesBackupSuccessfully.
@Test
public void refreshesBackupSuccessfully() {
InProgressBackupToken inProgressBackupToken = validBackupToken();
Set<LockToken> lockTokens = ImmutableSet.of(inProgressBackupToken.getLockToken());
when(mockTimelock.refreshLockLeases(lockTokens)).thenReturn(Futures.immediateFuture(RefreshLockResponseV2.of(lockTokens, mock(Lease.class))));
assertThat(AtlasFutures.getUnchecked(atlasBackupService.refreshBackup(AUTH_HEADER, refreshBackupRequest(inProgressBackupToken)))).isEqualTo(refreshBackupResponseWith(inProgressBackupToken));
verify(authHeaderValidator).suppliedHeaderMatchesConfig(AUTH_HEADER);
}
Aggregations