Ancestor { static <S> Ancestor<S> moreProbable(Ancestor<S> first, Ancestor<S> second) { return first.logProbability > second.logProbability ? first : second; } private  Ancestor(double logProbability,
      HistoryChain<S> historyChain,
      @Nullable BiFunction<S, S, Bigram<S>> bigramProvider);   }
@Test void testMoreProbable() { Ancestor<String> ancestor = Ancestor.createInitial(Ngram::create, "1", "2", "3", null); Ancestor<String> first = ancestor.createDescendant(-0.5, "a"); Ancestor<String> second = ancestor.createDescendant(-1.0, "b"); assertEquals(Ancestor.moreProbable(first, second).mostRecent(), "a"); }