Added some test related functions.