bug fix on error scenarios. integration test using a controlled event