Tests tree to string