raise exceptions on invalid input
better test naming