void (String testFile, String... companionFiles) { var decompiler = fixture.getDecompiler(); var classFile = fixture.getTestDataDir().resolve("classes/" + testFile + ".class"); assertThat(classFile).isRegularFile(); for (var file : SingleClassesTest.collectClasses(classFile)) { decompiler.addSource(file.toFile()); } for (String companionFile : companionFiles) { var companionClassFile = fixture.getTestDataDir().resolve("classes/" + companionFile + ".class"); assertThat(companionClassFile).isRegularFile(); for (var file : SingleClassesTest.collectClasses(companionClassFile)) { decompiler.addSource(file.toFile()); } } Assertions.assertThatThrownBy(() -> { decompiler.decompileContext(); }) .isInstanceOf(CancellationManager.CanceledException.class) .matches(exception -> exception.getCause() instanceof IllegalArgumentException); }