Fix the test as DAO now ignores undefined value for query

/to @ritch