ForwardingPTransform extends PTransform<InputT, OutputT> { @Override public void validate(PipelineOptions options) { delegate().validate(options); }  @Override OutputT expand(InputT input); @Override Map<TupleTag<?>, PValue> getAdditionalInputs(); @Override void validate(PipelineOptions options); @Override String getName(); @Override void populateDisplayData(DisplayData.Builder builder);  }
@Test public void validateDelegates() { @SuppressWarnings("unchecked") PipelineOptions options = mock(PipelineOptions.class); doThrow(RuntimeException.class).when(delegate).validate(options); thrown.expect(RuntimeException.class); forwarding.validate(options); }