public static <T extends PipelineOptions> T validate(Class<T> klass, PipelineOptions options) {
    return validate(klass, options, false);
  }
@Test
  public void testSuperInterfaceRequiredOptionsAlsoRequiredInSubInterface() {
    SubOptions subOpts = PipelineOptionsFactory.as(SubOptions.class);
    subOpts.setFoo("Bar");
    subOpts.setRunner(CrashingRunner.class);

    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("otherSuper");
    expectedException.expectMessage("Missing required value");
    expectedException.expectMessage("getSuperclassObj");

    PipelineOptionsValidator.validate(SubOptions.class, subOpts);
  }