tests mimic code