void (String text) { myFixture.configureByText(PlainTextFileType.INSTANCE, text); ServiceContainerUtil .replaceService(ApplicationManager.getApplication(), VMOptionsService.class, new TestVMOptionService(), getTestRootDisposable()); ApplicationConfiguration configuration = new ApplicationConfiguration("Hello", getProject()); configuration.setAlternativeJrePathEnabled(true); configuration.setAlternativeJrePath("/my/jre"); Document document = myFixture.getEditor().getDocument(); document.putUserData(VmOptionsEditor.SETTINGS_KEY, configuration); }