wrote test case for ModelQuery