StateContexts { @SuppressWarnings("unchecked") public static <W extends BoundedWindow> StateContext<W> nullContext() { return (StateContext<W>) NULL_CONTEXT; }  @SuppressWarnings("unchecked") static StateContext<W> nullContext(); static StateContext<W> windowOnlyContext(W window);  }
@Test public void nullContextThrowsOnWindow() { StateContext<BoundedWindow> context = StateContexts.nullContext(); thrown.expect(IllegalArgumentException.class); context.window(); }
@Test public void nullContextThrowsOnSideInput() { StateContext<BoundedWindow> context = StateContexts.nullContext(); thrown.expect(IllegalArgumentException.class); context.sideInput(view); }
@Test public void nullContextThrowsOnOptions() { StateContext<BoundedWindow> context = StateContexts.nullContext(); thrown.expect(IllegalArgumentException.class); context.getPipelineOptions(); }