There's some cleanup to be done in `FeatureMigrationIT` and related classes.

- [x] Convert `static` `preMigrationHook` and `postMigrationHook` to use instance members, retrieved from the `internalCluster()`
- [x] Use Hamcrest matchers as described [in this comment](https://github.com/elastic/elasticsearch/pull/84192/files#r812224067) for better failure output
- [x] Rename `createSimpleSettings` to `createSettings`
- [x] Rename `createSimpleMapping` to `createMapping`
- [x] add support for unknown fields https://github.com/elastic/elasticsearch/pull/84258#pullrequestreview-890890422
modules/reindex/src/internalClusterTest/java/org/elasticsearch/migration/AbstractFeatureMigrationIntegTest.java
.setSettings(createSimpleSettings(NEEDS_UPGRADE_VERSION, EXTERNAL_MANAGED_FLAG_VALUE))
        .setMappings(createSimpleMapping(true, false))
        .setOrigin(ORIGIN)
        .setVersionMetaKey(VERSION_META_KEY)
        .setAllowedElasticProductOrigins(Collections.singletonList(ORIGIN))
        .setMinimumNodeVersion(NEEDS_UPGRADE_VERSION)
        .setPriorSystemIndexDescriptors(Collections.emptyList())
        .build();
    static final int EXTERNAL_UNMANAGED_FLAG_VALUE = 4;
    static final String ASSOCIATED_INDEX_NAME = ".my-associated-idx";
    @Before
    public void setupTestPlugin() {
        TestPlugin.preMigrationHook.set((state) -> Collections.emptyMap());
        TestPlugin.postMigrationHook.set((state, metadata) -> {});
    }
    public void createSystemIndexForDescriptor(SystemIndexDescriptor descriptor) throws InterruptedException {
        Assert.assertTrue(
            "the strategy used below to create index names for descriptors without a primary index name only works for simple patterns",
            descriptor.getIndexPattern().endsWith("*")
        );
        String indexName = Optional.ofNullable(descriptor.getPrimaryIndex()).orElse(descriptor.getIndexPattern().replace("*", "old"));
        CreateIndexRequestBuilder createRequest = prepareCreate(indexName);
        createRequest.setWaitForActiveShards(ActiveShardCount.ALL);
        if (SystemIndexDescriptor.DEFAULT_SETTINGS.equals(descriptor.getSettings())) {
            
            createRequest.setSettings(
                createSimpleSettings(
                    NEEDS_UPGRADE_VERSION,
                    descriptor.isInternal() ? INTERNAL_UNMANAGED_FLAG_VALUE : EXTERNAL_UNMANAGED_FLAG_VALUE
                )