Revised test to look for warning in the list of warnings