This should check that it is raising the expected error.