// wiring the accumulate function using the string based setProperty() method
config.setProperty( AccumulateFunctionOption.PROPERTY_NAME+"maximum",
MaxAccumulateFunction.class.getName() );
MaxAccumulateFunction max = new MaxAccumulateFunction();
// checking the type safe getOption() method
assertEquals( AccumulateFunctionOption.get( "maximum", max ),
config.getOption( AccumulateFunctionOption.class, "maximum" ) );
// checking string conversion
assertEquals( "maximum",
config.getOption( AccumulateFunctionOption.class, "maximum" ).getName() );
assertEquals( max.getClass().getName(),
config.getOption( AccumulateFunctionOption.class, "maximum" ).getFunction().getClass().getName() );
// checking the string based getProperty() method
assertEquals( MaxAccumulateFunction.class.getName(),
config.getProperty( AccumulateFunctionOption.PROPERTY_NAME+"maximum" ) );
keySet.add( "avg" );