void (String testFile, String... companionFiles) { var decompiler = fixture.getDecompiler(); var classFile = fixture.getTestDataDir().resolve("classes/" + testFile + ".class"); assertThat(classFile).isRegularFile(); for (var file : collectClasses(classFile)) { decompiler.addSource(file.toFile()); } for (String companionFile : companionFiles) { var companionClassFile = fixture.getTestDataDir().resolve("classes/" + companionFile + ".class"); assertThat(companionClassFile).isRegularFile(); for (var file : collectClasses(companionClassFile)) { decompiler.addSource(file.toFile()); } } decompiler.decompileContext(); var decompiledFile = fixture.getTargetDir().resolve(classFile.getFileName().toString().replace(".class", ".java")); assertThat(decompiledFile).isRegularFile(); assertTrue(Files.isRegularFile(decompiledFile)); var referenceFile = fixture.getTestDataDir().resolve("results/" + classFile.getFileName().toString().replace(".class", ".dec")); assertThat(referenceFile).isRegularFile(); assertFilesEqual(referenceFile, decompiledFile); }