There's a sci-fi-ish short story in The Mind's I (https://en.wikipedia.org/wiki/The_Mind%27s_I) about a robot which scuttles around, when stroked it glows, then when it is hurt it mewls and flashes its lights, and so on. It's meant to question whether we can really know what any other animal is thinking (the machine is supposedly programmed like a regular computer, so we know it has no real feelings).
Of course this applies to robots, but not necessarily to animals, where we know they are constructed similarly to ourselves and so likely have feelings similar to ours although there are questions to what degree.
It's actually online here: https://themindi.blogspot.co.uk/2007/02/chapter-8-soul-of-ma...