when(fileSystem.mainFiles(CxxLanguage.KEY)).thenReturn(mainFiles);
when(fileSystem.testFiles(CxxLanguage.KEY)).thenReturn(testFiles);
when(fileSystem.getSourceDirs()).thenReturn(sourceDirs);
when(fileSystem.getTestDirs()).thenReturn(testDirs);
Project project = mock(Project.class);
when(project.getFileSystem()).thenReturn(fileSystem);
CxxLanguage lang = mockCxxLanguage();
when(project.getLanguage()).thenReturn(lang);
when(project.getLanguageKey()).thenReturn(lang.getKey());
// only for testing, Configuration is deprecated
Configuration configuration = mock(Configuration.class);
when(configuration.getBoolean(CoreProperties.CORE_IMPORT_SOURCES_PROPERTY,
CoreProperties.CORE_IMPORT_SOURCES_DEFAULT_VALUE)).thenReturn(true);
when(project.getConfiguration()).thenReturn(configuration);
return project;
}