added document reference to the test main function.