Test Connection contracts for closed and failed state and fix errors.