More reliable test with better error message