I think consciousness, and many other internal states of humans (emotions, thoughts, etc) boil down to behavior. The way we attribute consciousness (or any other internal state, including self-awareness) it by looking at their behavior. If they do the things that we do when we experience consciousness, we attribute consciousness to them.
So, if people talk to me, and respond to me in a varied and unpredictable way; if they seem to have ideas and can express them to me; in short, if I believe they are communicating with me, I attribute consciousness to them. To the extent that someone (or something) can communicate with me in a way where I believe we understand each other, then I attribute that level of consciousness to them.
To the extent that they talk about their own consciousness, and seem to understand how their thinking process works, I attribute self-awareness to them. Consciousness is a specific behavior.
It really doesn’t matter if the other “consciousness” is actually thinking or conscious, or not. If they behave as I expect someone with consciousness to behave, then I believe they are conscious. Consciousness can only be an illusion if a person’s senses are misperceiving things. So someone might attribute consciousness to a rock or a tree, if he or she thought their behavior was communication with with them, and they could communicate back to them. If anyone else did this, then I would think that the consciousness of the rock was an illusion (unless, of course, I experienced the communication, too).
Conscious entities exhibit the behaviors of consciousness. They communicate. It’s easy to prove they are attempting to communicate. You can measure sound or movements. You can observe responses to attempts by other entities to communicate. If they look like they are communicating, then we have proven they are conscious.