Model and tests