While running tests for query module, I've found the following thing. I'm not sure whether this is a bug, but the same flow for CacheQueryImpl works in different way rather than for ClusteredCacheQueryImpl.
I'm running the following command on already created ClusteredQuery:
This code throws NullPointerException, as the check of FetchMode is done in switch/case statement.
The same code for CacheQuery throws IllegalArgumentException, as the check is done with if/else statement.
Please find the test attached.