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
    public void if_no_import_locations_are_specified_and_whole_classpath_is_set_false_then_the_default_is_the_package_of_the_test_class() {
        TestAnalysisRequest defaultOptions = new TestAnalysisRequest().withWholeClasspath(false);

        JavaClasses classes = cache.getClassesToAnalyzeFor(TestClass.class, defaultOptions);

        assertThatTypes(classes).contain(getClass(), TestAnalysisRequest.class);
        assertThatTypes(classes).doNotContain(ClassFileImporter.class);
    }