void () { final VirtualFile file1 = createFile("src/A.java", "public class A{}"); final VirtualFile file2 = createFile("src/B.java", "public class B{}"); final Module module = addModule("module", file1.getParent()); final Artifact artifact = addArtifact(root().module(module)); setBuildOnMake(artifact); make(module); assertOutput(artifact, fs().file("A.class").file("B.class")); compile(false, file1).assertUpToDate(); ensureTimeChanged(); final String[] aPath = {"A.class"}; //file should be deleted and recompiled by javac and recompiled by artifacts compiler compile(true, file1).assertGenerated(aPath); ensureTimeChanged(); make(module); ensureTimeChanged(); final String[] bothPaths = {"A.class", "B.class"}; compile(true, file1, file2).assertGenerated(bothPaths); }