I had to open baby milk once and taste it to satisfy airport security, not the most pleasant experience, wasn't resealable either
That wasn't in N. America was it?? That isn't allowed. They can swab it but not make you open it. What if you had been on route to Australia??