This will catch the warning and then assert it is the one expected.  Essentially it wraps 2 lines into one - the catch and then the check.