Tests for 404 and 200 codes, and nested functions