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