Set<String> keySet = new HashSet<String>();
// in this use case, the application already has the instance of the accumulate function
AccumulateFunction function = new AverageAccumulateFunction();
// creating the option and storing in a local var just to make test easier
AccumulateFunctionOption option = AccumulateFunctionOption.get( "avg", function );
// wiring the accumulate function using the type safe method
config.setOption( option );
// checking the type safe getOption() method