Add tests for methodExists() function in Engine class.