generalize result registering test