@Test
public void getQuerySearchingForAllIndexedFieldsThrowsExceptionWhenEntityNotIndexed() {

    // given / when / then
    assertThatThrownBy(() -> hibernateSearchService.getQuerySearchingForAllIndexedFields(NonIndexedEntity.class, ""))
            .isInstanceOf(IllegalArgumentException.class)
            .hasMessage("Given type is not an entity or is not indexed!");
}