Editor { public boolean converge(TaskContext context) { return this.edit(line -> context.recordSystemModification(logger, line)); } Editor(Path path, LineEditor editor);  Editor(String name,
                  Supplier<List<String>> supplier,
                  Consumer<List<String>> consumer,
                  LineEditor editor); boolean edit(Consumer<String> logConsumer); boolean converge(TaskContext context);  }
@Test public void testMissingFile() { LineEditor lineEditor = mock(LineEditor.class); when(lineEditor.onComplete()).thenReturn(List.of("line")); TaskContext context = mock(TaskContext.class); var editor = new Editor(path.toPath(), lineEditor); editor.converge(context); assertEquals("line\n", path.readUtf8File()); }