### Question:
AutoRefreshSphereAccessTokenSupplierImpl extends AutoCloseableService implements RefreshableSphereAccessTokenSupplier { public static SphereAccessTokenSupplier createAndBeginRefreshInBackground(final SphereAuthConfig config, final HttpClient httpClient, final boolean closeHttpClient) { return new AutoRefreshSphereAccessTokenSupplierImpl(config, httpClient, closeHttpClient); } private  AutoRefreshSphereAccessTokenSupplierImpl(final SphereAuthConfig config, final HttpClient httpClient, final boolean closeHttpClient); @Override CompletionStage<String> get(); @Override CompletionStage<String> getNewToken(); static SphereAccessTokenSupplier createAndBeginRefreshInBackground(final SphereAuthConfig config, final HttpClient httpClient, final boolean closeHttpClient);  }### Answer:
@Test public void refreshesAfterTimeoutOfToken() throws Exception { final TestDoubleHttpClient httpClient = getHttpClient(); try(final SphereAccessTokenSupplier supplier = AutoRefreshSphereAccessTokenSupplierImpl.createAndBeginRefreshInBackground(SphereAuthConfig.of("project-key", "client-id", "clientSecret"), httpClient, true)) { Thread.sleep(3000); assertThat(httpClient.getTimesCalledCount()).isGreaterThan(2).isLessThan(5); } }