### Question:
JwksManager { public boolean fetchJwksIfNeeded(final KeycloakConfiguration keycloakConfiguration, final boolean forceFetch) { if (forceFetch || shouldRequestJwks(keycloakConfiguration)) { fetchJwks(keycloakConfiguration, null); return true; } return false; } JwksManager(@NonNull final Context context, @NonNull final MobileCore mobileCore,
                    @NonNull final AuthServiceConfiguration authServiceConfiguration); JsonWebKeySet load(final KeycloakConfiguration keyCloakConfig); boolean fetchJwksIfNeeded(final KeycloakConfiguration keycloakConfiguration,
                    final boolean forceFetch); void fetchJwks(@NonNull final KeycloakConfiguration keycloakConfiguration,
                    @Nullable final Callback<JsonWebKeySet> cb); static final String TAG; }### Answer:
@Test public void testFetchJwksIfNeeded() throws InterruptedException { JwksManager jwksManager = new JwksManager(ctx, mobileCore, authServiceConfiguration); when(sharedPrefs.getLong(anyString(), anyLong())).thenReturn(0L, System.currentTimeMillis()); boolean fetched = jwksManager.fetchJwksIfNeeded(keycloakConfiguration, false); Assert.assertTrue(fetched); fetched = jwksManager.fetchJwksIfNeeded(keycloakConfiguration, false); Assert.assertFalse(fetched); }