public void doTest(String input, List<SourceFile> files, String expected) {
    testEditor = configureEditor("Test.kt", input);

    if (files != null) {
      for (SourceFile file : files) {
        createSourceFile(file.getName(), file.getContent());
      }
    }

    testEditor.save();
    joinBuildThread();

    try {
      IMarker[] markers =
          testEditor.getEditingFile().findMarkers(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE);
      List<IMarkerResolution> resolutions = collectResolutions(markers);
      for (IMarkerResolution resolution : resolutions) {
        resolution.run(null);
      }
    } catch (CoreException e) {
      throw new RuntimeException(e);
    }

    EditorTestUtils.assertByEditor(testEditor.getEditor(), expected);
  }