SpringProfileActivationStrategy extends AbstractTokenizedActivationStrategy { @Override public Parameter[] getParameters() { return new Parameter[] { ParameterBuilder.create(PARAM_PROFILES) .label("Profile Names") .description("A comma-separated list of profile names for which the feature should be active. A " + "profile can be negated by prefixing the name with the NOT operator (!).") }; }  @Override String getId(); @Override String getName(); @Override boolean isActive(FeatureState featureState, FeatureUser user, List<Token> tokens); @Override Parameter[] getParameters(); @Override String getTokenParameterName(); @Override TokenTransformer getTokenParameterTransformer(); static final String ID; static final String PARAM_PROFILES; }
@Test void testGetParameters() { Parameter[] parameters = strategy.getParameters(); assertEquals(1, parameters.length); Parameter parameter = parameters[0]; assertNotNull(parameter); assertEquals(SpringProfileActivationStrategy.PARAM_PROFILES, parameter.getName()); assertTrue(Strings.isNotBlank(parameter.getLabel())); assertTrue(Strings.isNotBlank(parameter.getDescription())); }