Add tests for get_orphans