Refactored CommonExceptionProcessor and added a couple tests.