@Test
public void validateFeatureThrowingBoolMismatchedOptionIds() {

  OptionCollection.Builder existing = OptionCollection.newBuilder()
      .setOption(OptionType.bool)
      .addItems(FeatureOption.newBuilder().setValue("true").setKey("true").setId("1"))
      .addItems(FeatureOption.newBuilder().setValue("false").setKey("false").setId("2"));
  OptionCollection.Builder update = OptionCollection.newBuilder()
      .setOption(OptionType.bool)
      .addItems(FeatureOption.newBuilder().setValue("true").setKey("true").setId("1"))
      // option id 3 is not already existing
      .addItems(FeatureOption.newBuilder().setValue("false").setKey("false").setId("3"));
  try {
    new FeatureValidator().validateOptionIdsForUpdate(existing.build(), update.build());
    fail();
  } catch (ServiceException e) {
    assertEquals(422, e.problem().status());
    assertSame("option_ids_mismatch", e.problem().title());
  }
}