{
this.importData(date);
ObjectContentManager ocm = this.getObjectContentManager();
// Query all objects
QueryManager queryManager = this.getQueryManager();
Filter filter = queryManager.createFilter(Atomic.class);
filter.setScope("/");
Query query = queryManager.createQuery(filter);
Collection result = ocm.getObjects(query);
assertEquals("Incorrect number of objects found", 10, result.size());
// Get objects
Atomic atomic = (Atomic) ocm.getObject( "/test[2]");
assertNotNull("Object /test[2] not found", atomic);
atomic = (Atomic) ocm.getObject( "/test[10]");
assertNotNull("Object /test[2] not found", atomic);
// Update the object
atomic.setString("Modified Test String 10");
ocm.update(atomic);
ocm.save();
// Query on the attribute "string"
queryManager = this.getQueryManager();
filter = queryManager.createFilter(Atomic.class);
filter.addLike("string", "Modified%");
query = queryManager.createQuery(filter);
result = ocm.getObjects(query);
assertTrue("Incorrect number of objects found", result.size() == 1);
atomic = (Atomic) ocm.getObject(query);
assertNotNull("Object not found", atomic);
assertTrue("Incorrect Object", atomic.getString().equals("Modified Test String 10"));
// Delete all objects
queryManager = this.getQueryManager();
filter = queryManager.createFilter(Atomic.class);
filter.setScope("/");
query = queryManager.createQuery(filter) ;
ocm.remove(query);
ocm.save();
result = ocm.getObjects(query);
assertTrue("Incorrect number of objects found", result.size() == 0);