HSEARCH-1616 Adding a test and changing the BooleanJunction exception from an AssertionError to a SearchException