ScenarioDefinition implements ImmutableBean { public Set<Class<? extends ScenarioFunction<?, ?>>> getFunctionTypes() { Set<Class<? extends ScenarioFunction<?, ?>>> functionTypes = new HashSet<>(_arguments.keySet()); for (ScenarioArgumentKey pair : _columnArguments.keySet()) { functionTypes.add(pair.getFunctionType()); } return functionTypes; } ScenarioDefinition(ScenarioArgument<?, ?>... arguments);  ScenarioDefinition(List<ScenarioArgument<?, ?>> arguments);  ScenarioDefinition(List<ScenarioArgument<?, ?>> arguments,
                            Map<String, List<ScenarioArgument<?, ?>>> columnArguments); private  ScenarioDefinition(List<ScenarioArgument<?, ?>> arguments,
                             ImmutableListMultimap<ScenarioArgumentKey, ScenarioArgument<?, ?>> columnArguments); private  ScenarioDefinition(
      ListMultimap<Class<? extends ScenarioFunction<?, ?>>, ScenarioArgument<?, ?>> arguments,
      ListMultimap<ScenarioArgumentKey, ScenarioArgument<?, ?>> columnArguments); ScenarioDefinition mergedWith(ScenarioDefinition other); ScenarioDefinition with(List<ScenarioArgument<?, ?>> arguments); ScenarioDefinition with(ScenarioArgument<?, ?>... arguments); ScenarioDefinition with(List<ScenarioArgument<?, ?>> arguments, String... names); ScenarioDefinition with(ScenarioArgument<?, ?> argument, String... names); FilteredScenarioDefinition filter(String name); Set<Class<? extends ScenarioFunction<?, ?>>> getFunctionTypes(); boolean isEmpty(); static ScenarioDefinition.Meta meta(); static ScenarioDefinition.Builder builder(); @Override ScenarioDefinition.Meta metaBean(); @Override Property<R> property(String propertyName); @Override Set<String> propertyNames(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static final ScenarioDefinition EMPTY; }
@Test public void getFunctionTypes() { List<ScenarioArgument<?, ?>> argList = ImmutableList.<ScenarioArgument<?, ?>>of(_arg11); Map<String, List<ScenarioArgument<?, ?>>> argMap = new HashMap<>(); argMap.put("foo", ImmutableList.<ScenarioArgument<?, ?>>of(_arg21)); ScenarioDefinition scenarioDefinition = new ScenarioDefinition(argList, argMap); Set<Class<? extends ScenarioFunction<?, ?>>> functionTypes = scenarioDefinition.getFunctionTypes(); assertTrue(functionTypes.contains(Fn1.class)); assertTrue(functionTypes.contains(Fn2.class)); }