Make anomaly test framework tunable with callbacks

Change-Id: I4c7610b73b72f60c9becfd2195f2a3eb7deaf0d4