private PCollectionContentsAssert<T> withPane( BoundedWindow window, SimpleFunction<Iterable<ValueInSingleWindow<T>>, Iterable<T>> paneExtractor) { @SuppressWarnings({"unchecked", "rawtypes"}) Coder<BoundedWindow> windowCoder = (Coder) actual.getWindowingStrategy().getWindowFn().windowCoder(); return new PCollectionContentsAssert<>( actual, IntoStaticWindows.of(windowCoder, window), paneExtractor, site); }
/** * Constructs an {@link IterableAssert} for the elements of the provided {@link PCollection} with * the specified reason. */ public static <T> IterableAssert<T> that(String reason, PCollection<T> actual) { return new PCollectionContentsAssert<>(actual, PAssertionSite.capture(reason)); }