"I didn't put my name in that goblet!" said Harry, starting to feel angry.
"Yeah, okay," said Ron in exactly the same skeptical tone as Cedric. "Only you said this morning you'd have done it last night, and no one would've seen you. . . .I'm not stupid, you know."
"You're doing a really good impression of it," Harry snapped.
. . .
Harry ... staring at the dark red velvet curtains, now hiding one of the few people he had been sure would believe him.
Harry Potter and the Goblet of Fire
Does it mean "you're remembering it very well", but like sarcastically?
Especially I don't understand what "impression" means here.