KotlinSnippetExecutor extends AbstractSnippetExecutor<KotlinSnippetExecutorOptions> { protected String formatPackageName(final String packageName) { final String packageLineBeginning = "package "; String formattedPackageLine; if (packageName.startsWith(packageLineBeginning)) { formattedPackageLine = packageName; } else { formattedPackageLine = packageLineBeginning.concat(packageName); } return formattedPackageLine; } KotlinSnippetExecutor(); @Override Parent getUI(final CodeSnippet codeSnippet); @Override Node getConfigurationUI(); @Override void saveNewOptions(); @Override ObservableList<String> execute(final CodeSnippet codeSnippet);  }
@Test public void formatPackageWithoutPackageKeyword() { assertEquals("package SlideshowFX", snippetExecutor.formatPackageName("SlideshowFX")); }
@Test public void formatPackageWithPackageKeyword() { assertEquals("package SlideshowFX", snippetExecutor.formatPackageName("package SlideshowFX")); }