Forgetting the particular example, but just dealing with pain/pleasure, determining the internal state of another being that is incommunicative is difficult. But you can at a simple first pass use other data than self-reporting, say, crying or wasting away (which I presume that you see in yourself as markers of pain/pleasure).
How do we even know that other people have thoughts and feelings? Skeptically of course we don't -know-, but we see in ourselves that we have say a pain and we react a certain way (crying out or wanting to or the memory of such when younger) and we guess (usually successfully) that if we see that in others then they must also be feeling that way, and also the converse, if we don't see crying then we expect that they are not in pain.
Of course, from experience we have all found (I surmise from seeing others) that life is not so simple: that the converse of material implication (the converse of 'P implies Q' is 'Q implies P') does not match the truth of the original, that pain and pleasure is not black and white, that people hide their feelings, that our senses are not always so accurate, that our judgements can be clouded by so many things, etc, etc, etc.
So we can look at a baby eating and probably infer that if they're feeding, what ever it is they're eating is less repulsive than the limit needed to stop them. It could be suffering at the taste, but not enough to want to suffer at the lack of food.
Judging inner states of animals is so much harder because we can't so easily recognize similarities between ourselves and them. For all we know, dogs may totally resent our lording our authority over them, and cats really really love us but just don't know how to show it.
Back to philosophy, you can't know for sure, but you can learn what's an accurate measure of inner state by experience with yourself and your inner feelings and with babies' external appearance, but of course there's room for mistakes. Frankly, I think babies are easy; they look happy when they're feeding. It's adults who are so complex and act the opposite of what they think (for so many possible reasons).