Testing of motors