Fix class reference bug in test