Create a test for HSEARCH-734

Description

Preventing the NPE reported as was trivial, but we are missing a test for it.

Environment

None

Status

Assignee

Davide Di Somma

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

Yes, likely

Pull Request

None

Feedback Requested

None

Fix versions

Priority

Major