@Test
public void getNamesOfAnnotatedStringFieldsReturnsCachedListWhenPresent() {

    // given
    var cachedFieldNames = List.of("field_1", "field_2");
    hibernateSearchService.classIndexedFieldMap.put(IndexedEntity.class, cachedFieldNames);
    // when
    var actualFieldNames = hibernateSearchService.getNamesOfAnnotatedStringFields(IndexedEntity.class);
    // then
    assertThat(actualFieldNames).containsExactlyInAnyOrderElementsOf(cachedFieldNames);
}