DefaultFeatureManager implements FeatureManager { @Override public FeatureState getFeatureState(Feature feature) { Validate.notNull(feature, "feature is required"); FeatureState state = stateRepository.getFeatureState(feature); if (state == null) { state = getMetaData(feature).getDefaultFeatureState(); } return state; } DefaultFeatureManager(String name, FeatureProvider featureProvider, StateRepository stateRepository,
        UserProvider userProvider, ActivationStrategyProvider activationStrategyProvider); @Override String getName(); @Override Set<Feature> getFeatures(); @Override FeatureMetaData getMetaData(Feature feature); @Override boolean isActive(Feature feature); @Override FeatureState getFeatureState(Feature feature); @Override void setFeatureState(FeatureState state); @Override List<ActivationStrategy> getActivationStrategies(); @Override FeatureUser getCurrentFeatureUser(); @Override String toString();  }
@Test public void testGetFeatureState() { FeatureState state = manager.getFeatureState(MyFeatures.DELETE_USERS); assertEquals(MyFeatures.DELETE_USERS, state.getFeature()); assertTrue(state.isEnabled()); assertEquals("admin", state.getParameter(UsernameActivationStrategy.PARAM_USERS)); }