Changed http status code testing logic