reflection and generic test codes