test define_method