DependencyResolvingFeatureManager implements IFeatureManager { @Override public IFeature newFeature(final String name, final IFilesystemTracker filesystemTracker) throws FeatureManagementException { try { return new Feature(this, name); } catch (InvalidArgumentException e) { throw new FeatureManagementException("Cold not create a feature.", e); } } DependencyResolvingFeatureManager(final String localRepoPath, final Map<String, String> remotes); @Override IFeature newFeature(final String name, final IFilesystemTracker filesystemTracker);  }
@Test(expected = FeatureManagementException.class) public void Should_throw_When_InvalidArgumentsPassedForFeatureCreation() throws Exception { assertNotNull(new DependencyResolvingFeatureManager("/", remoteRepos) .newFeature(null, null)); }
@Test public void Should_createFeatures() throws Exception { IFeature feature = new DependencyResolvingFeatureManager("/", remoteRepos) .newFeature("feature", null); assertNotNull(feature); assertTrue(feature instanceof Feature); assertEquals("feature", feature.getName()); }