improved test of failure cases