Refactored ensure() and ensureNot(); added throwProvidedException()

This has nothing to do with commit message.  Please separate into another commit.