@Override
    public void upgrade() {
        if (shouldSkip()) {
            return;
        }

        final ImmutableSet<String> eventIndexPrefixes = ImmutableSet.of(
                elasticsearchConfig.getDefaultEventsIndexPrefix(),
                elasticsearchConfig.getDefaultSystemEventsIndexPrefix());

        elasticsearch.addGl2MessageIdFieldAlias(eventIndexPrefixes);

        writeMigrationCompleted(eventIndexPrefixes);
    }
@Test
    void usesEventIndexPrefixesFromElasticsearchConfig() {
        mockConfiguredEventPrefixes("events-prefix", "system-events-prefix");

        this.sut.upgrade();

        verify(elasticsearchAdapter)
                .addGl2MessageIdFieldAlias(ImmutableSet.of("events-prefix", "system-events-prefix"));
    }