QueryManager queryManager = this.getQueryManager();
Filter filter = queryManager.createFilter(Paragraph.class);
filter.addEqualTo("text", "Para 1");
filter.setScope("/test/");
Query query = queryManager.createQuery(filter);
ObjectContentManager ocm = this.getObjectContentManager();
Collection result = ocm.getObjects(query);
assertEquals("Invalid number of objects - should be = 1", 1, result.size());
Paragraph paragraph = (Paragraph) result.iterator().next();