Added some tests that cover the new exception handling.
Refactored tests:

- Invalidate RAM cache on tearDown()
- More DRY