Contract tests