Added getRoot method and test