CloningBundleFactory implements BundleFactory { @Override public <T> UncommittedBundle<T> createRootBundle() { return underlying.createRootBundle(); } private  CloningBundleFactory(); static CloningBundleFactory create(); @Override UncommittedBundle<T> createRootBundle(); @Override UncommittedBundle<T> createBundle(PCollection<T> output); @Override UncommittedBundle<T> createKeyedBundle(
      StructuralKey<K> key, PCollection<T> output);  }
@Test public void rootBundleSucceedsIgnoresCoder() { WindowedValue<Record> one = WindowedValue.valueInGlobalWindow(new Record()); WindowedValue<Record> two = WindowedValue.valueInGlobalWindow(new Record()); CommittedBundle<Record> root = factory.<Record>createRootBundle().add(one).add(two).commit(Instant.now()); assertThat(root.getElements(), containsInAnyOrder(one, two)); }