Start Integration testcase

This starts the IntegrationTestCase class as described in #4371. While it is incomplete, the parts that are done 'work', and I figured a smaller blob of changes would be easier to discuss and find problems with.
Good point. Originally I was thinking that developers might wsnt to use `@expectedException`, but I agree it makes more sense for an integration test setup to invoke the app error handling.