Years ago, my older sister and I found dead mice surrounding a big bag of coffee beans in our cupboard. I was reminded of it when I was stocking away groceries.
You would know good coffee if mice keep on "gnawing" at them to the extent that they'll die of extreme "intoxication."