Ancestor { Bigram<S> getBigram() { Objects.requireNonNull(bigramProvider); return bigramProvider .apply(historyChain.getNonnullPayload(1), historyChain.getNonnullPayload(0)); } private  Ancestor(double logProbability,
      HistoryChain<S> historyChain,
      @Nullable BiFunction<S, S, Bigram<S>> bigramProvider);   }
@Test void testGetBigram() { Ancestor<String> ancestor = Ancestor.createInitial(Ngram::create, "1", "2", "3", null); Bigram<String> bigram = ancestor.getBigram(); assertEquals(bigram.getFirst(), "2"); assertEquals(bigram.getSecond(), "3"); }