Adding tests for the DeleteByQuery