Adding status_code as optional parameter and removing redundant tests