Allow callers to choose test result class.