@Test
public void allowedForQueriesChanged() {

    // Changing this option is always fine
    RecordMetaData metaData1 = RecordMetaData.build(TestRecords1Proto.getDescriptor());
    RecordMetaData metaData2 = replaceIndex(metaData1, "MySimpleRecord$str_value_indexed",
            indexProto -> changeOption(indexProto, IndexOptions.ALLOWED_FOR_QUERY_OPTION, "false"));
    validator.validate(metaData1, metaData2);
    RecordMetaData metaData3 = replaceIndex(metaData2, "MySimpleRecord$str_value_indexed",
            indexProto -> changeOption(indexProto, IndexOptions.ALLOWED_FOR_QUERY_OPTION, "true"));
    validator.validate(metaData2, metaData3);
    RecordMetaData metaData4 = replaceIndex(metaData3, "MySimpleRecord$str_value_indexed", this::clearOptions);
    validator.validate(metaData3, metaData4);
}