fs.add(newInputFile("src/main/java/foo/bar/Foo.java", "sample code", "foo/bar/Foo.java", "java", false));
Languages languages = new Languages(Java.INSTANCE);
ComponentIndexer indexer = createIndexer(languages);
indexer.execute(fs);
Resource sonarFile = org.sonar.api.resources.File.create("src/main/java/foo/bar/Foo.java", "foo/bar/Foo.java", Java.INSTANCE, false);
verify(sonarIndex).index(sonarFile);
verify(sourcePersister).saveSource(sonarFile, "sample code", null);
}