Add unit-tests checking if we can retire an orphaned package via the API