public static <T extends PipelineOptions> T validate(Class<T> klass, PipelineOptions options) {
    return validate(klass, options, false);
  }
@Test
  public void testWhenRequiredOptionIsSetAndCleared() {
    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage(
        "Missing required value for "
            + "[public abstract java.lang.String org.apache.beam."
            + "sdk.options.PipelineOptionsValidatorTest$Required.getObject(), \"Fake Description\"].");

    Required required = PipelineOptionsFactory.as(Required.class);
    required.setObject("blah");
    required.setObject(null);
    PipelineOptionsValidator.validate(Required.class, required);
  }