How to handle test case for Access Control when exception happen

Let's use the example from the doc: let's say the minters and burners role users are not actually the function caller. The function will thrown exception that

AccessControl: account XXX is missing role ZZZ

How do you handle that in the hardhat test case? Just using the try and catch block to bypass it or some kind of expect exception etc.

Hey @AvengerMoJo if your aim is to check that the error is thrown then I suggest to use this

https://ethereum-waffle.readthedocs.io/en/latest/matchers.html#revert-with-message