From a3cfed18ae54a0f3d9cc8e561d2eb9e067eef229 Mon Sep 17 00:00:00 2001 From: arus2023 Date: Thu, 5 Oct 2023 20:46:15 -0500 Subject: [PATCH] Removed 2 unnecessary stubbings in TimeBasedCacheTest.java --- src/test/java/io/curity/oauth/TimeBasedCacheTest.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/test/java/io/curity/oauth/TimeBasedCacheTest.java b/src/test/java/io/curity/oauth/TimeBasedCacheTest.java index 7433d9b..31e7506 100644 --- a/src/test/java/io/curity/oauth/TimeBasedCacheTest.java +++ b/src/test/java/io/curity/oauth/TimeBasedCacheTest.java @@ -41,7 +41,6 @@ public void doesNotReloadCacheWithinTimeLimit() // then 4 seconds later, then 8 seconds later. Clock fakeClock = mock(Clock.class); Instant now = Instant.now(); - when(fakeClock.millis()).thenCallRealMethod(); when(fakeClock.instant()).thenReturn( now, // get("0") - first map loading now, // cache asks when the latest loading happened @@ -49,12 +48,8 @@ public void doesNotReloadCacheWithinTimeLimit() // get("0") - should not even ask about the time as entry was found now.plus(Duration.ofSeconds(4)), // get("1") - no reloading now.plus(Duration.ofSeconds(8))); // get("1") - reload - @SuppressWarnings("unchecked") Supplier fakeSupplier = mock(Supplier.class); - when(fakeSupplier.get()).thenReturn( - Collections.singletonMap("0", 0), - Collections.singletonMap("1", 1)); // the map will always contain a single entry with the number of reloads as in // ("reloads" -> reloads)