public static <T extends PipelineOptions> T validate(Class<T> klass, PipelineOptions options) {
    return validate(klass, options, false);
  }
@Test
  public void testWhenOptionIsDefinedInMultipleSuperInterfacesAndIsNotPresentFailsRequirement() {
    RightOptions rightOptions = PipelineOptionsFactory.as(RightOptions.class);
    rightOptions.setBoth("foo");
    rightOptions.setRunner(CrashingRunner.class);

    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage("Missing required value for group");
    expectedException.expectMessage("getFoo");

    PipelineOptionsValidator.validate(JoinedOptions.class, rightOptions);
  }