TestObject (final String id, final JUnitConfiguration configuration, @NotNull ExecutionEnvironment environment) { if (JUnitConfiguration.TEST_METHOD.equals(id)) { return new TestMethod(configuration, environment); } if (JUnitConfiguration.TEST_CLASS.equals(id)) { return new TestClass(configuration, environment); } if (JUnitConfiguration.TEST_PACKAGE.equals(id)){ return new TestPackage(configuration, environment); } if (JUnitConfiguration.TEST_DIRECTORY.equals(id)) { return new TestDirectory(configuration, environment); } if (JUnitConfiguration.TEST_CATEGORY.equals(id)) { return new TestCategory(configuration, environment); } if (JUnitConfiguration.TEST_PATTERN.equals(id)) { return new TestsPattern(configuration, environment); } if (JUnitConfiguration.TEST_UNIQUE_ID.equals(id)) { return new TestUniqueId(configuration, environment); } if (JUnitConfiguration.TEST_TAGS.equals(id)) { return new TestTags(configuration, environment); } if (JUnitConfiguration.BY_SOURCE_POSITION.equals(id)) { return new TestBySource(configuration, environment); } if (JUnitConfiguration.BY_SOURCE_CHANGES.equals(id)) { return new TestsByChanges(configuration, environment); } LOG.info(JUnitBundle.message("configuration.not.specified.message", id)); return null; }