Added tests for criteria queries