@Test
@SuppressWarnings("unchecked")
public void getNamesOfAnnotatedStringFieldsGetsNamesOfAnnotatedStringFieldsAndCachesResultWhenNotPresent() {

    // given
    var expectedFieldNames = List.of("renamed_field", "secondField");
    // when
    var actualFieldNames = hibernateSearchService.getNamesOfAnnotatedStringFields(IndexedEntity.class);
    // then
    var softly = new SoftAssertions();
    softly.assertThat(actualFieldNames).containsExactlyInAnyOrderElementsOf(expectedFieldNames);
    softly.assertThat(hibernateSearchService.classIndexedFieldMap).containsExactly(
            Map.entry(IndexedEntity.class, expectedFieldNames)
    );
    softly.assertAll();
}