[#1849] Give tests more fine grained control over what exceptions they expect