@Test
void traverseAncestors() {

    final Set<Class<?>> expected = Stream.of(Object.class, Foo.class, Bar.class).collect(toSet());
    final Set<Class<?>> actual = ReflectionUtil.traverseAncestors(Bar.class)
            .collect(toSet());
    assertEquals(expected, actual);
}