JavaClasses getClassesToAnalyzeFor(Class<?> testClass, ClassAnalysisRequest classAnalysisRequest) {
        checkNotNull(testClass);
        checkNotNull(classAnalysisRequest);

        if (cachedByTest.containsKey(testClass)) {
            return cachedByTest.get(testClass);
        }

        LocationsKey locations = RequestedLocations.by(classAnalysisRequest, testClass).asKey();

        JavaClasses classes = classAnalysisRequest.getCacheMode() == FOREVER
                ? cachedByLocations.getUnchecked(locations).get()
                : new LazyJavaClasses(locations.locations, locations.importOptionTypes).get();

        cachedByTest.put(testClass, classes);
        return classes;
    }
@Test
    @UseDataProvider("test_classes_without_any_imported_classes")
    public void when_there_are_only_nonexisting_sources_nothing_is_imported(TestAnalysisRequest analysisRequest) {
        JavaClasses classes = cache.getClassesToAnalyzeFor(TestClass.class, analysisRequest);

        assertThat(classes).isEmpty();

        verify(cacheClassFileImporter).importClasses(anySet(), locationCaptor.capture());
        assertThat(locationCaptor.getValue()).isEmpty();
    }