Auto generate threshold wrappers

Added auto generation for ThresholdMethod interfaces and
ApplyThresholdMethod classes.
Auto generate threshold tests

Added auto generation for Threshold test classes.
fixup