@Test
public void testSupermaximal() {
System.out.println("Supermaximality Test");
Iterator<BinaryInterval> iter = lst.preorderIterator();
while (iter.hasNext()) {
BinaryInterval interval = iter.next();
if (!interval.isTerminal()) {
if ((distinctBwtSet.contains(interval) && maximalSet.contains(interval)) != isSupermaximal(interval)) {
System.err.printf("%s - got:%s, expected:%s\n", interval, distinctBwtSet.contains(interval),
isSupermaximal(interval));
int[] suffixTable = lst.getSuffixTable();
IntSequence sequence = corpus.sequence();
for (int i = interval.left(); i <= interval.right(); i++) {
System.err.print(corpus.toToken(sequence.get(suffixTable[i] - 1, sequence.size() - 1)) + " ");
}
System.err.println();
fail("supermaximality mismatch");
}