@Test
public void getQuerySearchingForAllIndexedFieldsThrowsExceptionWhenNoStringFieldsAnnotated() {

    // given / when / then
    assertThatThrownBy(() -> hibernateSearchService.getQuerySearchingForAllIndexedFields(IndexedEntityWithoutFields.class, ""))
            .isInstanceOf(IllegalArgumentException.class)
            .hasMessage("No field of type String annotated with @Field!");
}