Added specs for #extractPublicTree