@Test
public void findAncestorsIncludesSelf() throws Exception {

  JPanel panel1 = new JPanel();
  JPanel panel11 = new JPanel();
  JPanel panel12 = new JPanel();
  panel1.add(panel11);
  panel1.add(panel12);
  TreeWalker treeWalker = new TreeWalker(panel12);
  assertThat(treeWalker.ancestorStream().anyMatch(c -> c == panel12)).isTrue();
}