Fix not found and internal server error test conditions