public static <T, ComparatorT extends Comparator<T> & Serializable>
      Combine.Globally<T, List<T>> of(int count, ComparatorT compareFn) {
    return Combine.globally(new TopCombineFn<>(count, compareFn));
  }
@Test
  public void testTopEmptyWithIncompatibleWindows() {
    p.enableAbandonedNodeEnforcement(false);

    Window<String> windowingFn = Window.into(FixedWindows.of(Duration.standardDays(10L)));
    PCollection<String> input = p.apply(Create.empty(StringUtf8Coder.of())).apply(windowingFn);

    expectedEx.expect(IllegalStateException.class);
    expectedEx.expectMessage("Top");
    expectedEx.expectMessage("GlobalWindows");
    expectedEx.expectMessage("withoutDefaults");
    expectedEx.expectMessage("asSingletonView");

    input.apply(Top.of(1, new OrderByLength()));
  }