Added an integration-test that tests the exception-handling