/** * @deprecated since 0.10.0; see {@link #ancestorsAndSelf(Entity)} */ @Deprecated public static Iterable<Entity> ancestors(final Entity root) { return ancestorsAndSelf(root); }
@Test public void testAncestors() throws Exception { Asserts.assertEqualsIgnoringOrder(Entities.ancestorsAndSelf(app), ImmutableList.of(app)); Asserts.assertEqualsIgnoringOrder(Entities.ancestors(app), ImmutableList.of(app)); Asserts.assertEqualsIgnoringOrder(Entities.ancestorsAndSelf(entity), ImmutableList.of(entity, app)); Asserts.assertEqualsIgnoringOrder(Entities.ancestors(entity), ImmutableList.of(entity, app)); }