@Test
public void indexRecordTypeRemoved() {

    final String indexName = "simple&other$num_value_2";
    RecordMetaDataBuilder metaDataBuilder = RecordMetaData.newBuilder().setRecords(TestRecords1Proto.getDescriptor());
    metaDataBuilder.addMultiTypeIndex(Arrays.asList(metaDataBuilder.getRecordType("MySimpleRecord"), metaDataBuilder.getRecordType("MyOtherRecord")),
            new Index(indexName, "num_value_2"));
    RecordMetaData metaData1 = metaDataBuilder.getRecordMetaData();
    validateIndexMutation("new index removes record type", metaData1, indexName, indexProto ->
            indexProto.toBuilder().clearRecordType().addRecordType("MySimpleRecord").build()
    );
}