Method for measuring surface potential of the test mass with an optically levitated charged microsphere