* grandparents DO have parents in the gedcom - so the paternal GREAT grandparents should NOT be in the list, as
* they are not the lowest common ancestors.
*/
@Test
public void testLowestCommonAncestor4() {
Individual robert = getPerson("Andrews", "Robert");
Individual theresa = getPerson("Andrews", "Theresa");
if (VERBOSE) {
System.out.println("Any match of these will be fine:");
for (Individual i : anc.getExtendedAncestry(robert)) {
System.out.println("\t" + i.names.get(0).basic);
}
}
Set<Individual> lowestCommonAncestors = anc.getLowestCommonAncestors(robert, theresa);
assertEquals("Robert (father) and Theresa (daughter) should have two lowest common ancestors:"
+ " James Andrews, and Sally Struthers", 2, lowestCommonAncestors.size());
Individual sally = getPerson("Struthers", "Sally");
Individual james = getPerson("Andrews", "James");
assertTrue("Sally is a common ancestor (Robert's mom and Theresa's grandmother)",
lowestCommonAncestors.contains(sally));
assertTrue("James is a common ancestor (Robert's dad and Theresa's grandfather)",
lowestCommonAncestors.contains(james));
assertFalse("Steven Struthers (Robert's grandfather) is a common ancestor, but not a LOWEST common ancestor",