Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoox committed Feb 24, 2022
1 parent bc98894 commit 673b805
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
Expand Down Expand Up @@ -410,15 +409,9 @@ private Repository newCachingRepo() {
}

private Repository newCachingRepo(MeterRegistry meterRegistry) {
when(delegateRepo.history(INIT, INIT, Repository.ALL_PATH, 1)).thenReturn(completedFuture(
ImmutableList.of(new Commit(INIT, SYSTEM, "", "", Markup.PLAINTEXT))));

final Repository cachingRepo = new CachingRepository(
delegateRepo, new RepositoryCache("maximumSize=1000", meterRegistry));

// Verify that CachingRepository calls delegateRepo.history() once to retrieve the initial commit.
verify(delegateRepo, times(1)).history(INIT, INIT, Repository.ALL_PATH, 1);

verifyNoMoreInteractions(delegateRepo);
clearInvocations(delegateRepo);

Expand Down

0 comments on commit 673b805

Please sign in to comment.