add unit tests that ensure behaviour in #33, clarify error message.