BufferedPostProcessor implements Consumer<SageVariant> { public static boolean longerContainsShorter(@NotNull final SageVariant shorter, @NotNull final SageVariant longer) { return longerContainsShorter(shorter.variant(), longer.variant()); } BufferedPostProcessor(int maxDistance, final Consumer<SageVariant> consumer); @Override void accept(final SageVariant newVariant); static boolean longerContainsShorter(@NotNull final SageVariant shorter, @NotNull final SageVariant longer); static boolean longerContainsShorter(@NotNull final VariantHotspot shorter, @NotNull final VariantHotspot longer); void flush();  }
@Test public void testLongerContainsShorter() { final VariantHotspot mnv = create(100, "CAC", "TGT"); assertTrue(BufferedPostProcessor.longerContainsShorter(create(100, "C", "T"), mnv)); assertFalse(BufferedPostProcessor.longerContainsShorter(create(100, "C", "C"), mnv)); assertTrue(BufferedPostProcessor.longerContainsShorter(create(101, "A", "G"), mnv)); assertTrue(BufferedPostProcessor.longerContainsShorter(create(102, "C", "T"), mnv)); assertTrue(BufferedPostProcessor.longerContainsShorter(create(100, "CA", "TG"), mnv)); assertTrue(BufferedPostProcessor.longerContainsShorter(create(101, "AC", "GT"), mnv)); assertTrue(BufferedPostProcessor.longerContainsShorter(create(100, "CAC", "TGT"), mnv)); }