public static <T extends PipelineOptions> T validate(Class<T> klass, PipelineOptions options) {
    return validate(klass, options, false);
  }
@Test
  public void testWhenRequiredOptionIsSet() {
    Required required = PipelineOptionsFactory.as(Required.class);
    required.setRunner(CrashingRunner.class);
    required.setObject("blah");
    PipelineOptionsValidator.validate(Required.class, required);
  }