unit tests for contract violation handler