Update get status in rest and added a test to check invalid status.