the core of most tests generalized into testDuration method