test refactoring
Fixed a CollectionDAO.getCollectionSize bug which resulted in wrong
query result for successive method calls.