You would have to test them, and they will tell you that they don't want to be tested. Of course, the only real reason they don't want you to test them is because they know they can't possibly pass, but that is not the question you are asking. How to test them for legitimacy. Part of that depends on what they claim their psychic powers are. Here are some quick tests that you could do and get out of the way before consulting the psychic. If they fail, they are probably fake, if they pass they are probably legit.
1) You could give them a simple blind card test. Take a simple deck of cards and shuffle them. Draw one out of the deck, and ask the psychic to identify it. Make sure the card is visible for any ghosts or spirits to see, just not the psychic. Draw 5 times, if the psychic gets all 5 (suit and value) they are real for sure (chances of random success is over 1 in 300 million). Even if they just get the suits its a 1 in 1024 chance. Anything less than 2 cards suit and value correct is probably just a guess.
2) Have a random object hidden in your pocket, or on your person, not a personal possession (shiny rock, guitar pick, coupon for chicken). Ask him/her to specifically identify it. If he is vague and give you information that is obvious (its something light and small) then he is faking. If he identifies it, and describes it well, he is probably legit. Anything in between is interesting, but a big maybe.
I think the best indicator is that anyone who truly believes they are a true psychic would not have any problem with you testing them first, as long as you are being up front and honest about it. Just like any doctor would not be offended if you asked for their credentials before visiting them, or for that matter any professional in any field would not be offended if you made sure they were legit first.
If they are offended and refuse to be tested, then they probably don't believe they can pass the test, which is a strong indicator that they are fake.
I mean, what would you do if you asked a physician for his credentials and he said "I don't need those, I got a sign on my door with my name and the letters DR in front. If thats not proof enough that I am a real doctor then go to someone else." You probably wouldn't go to him with your medical needs, would you?