DAO { private DAO() { } private  DAO(); static IODocumentWrapper asWrapper(Object obj); static ODocument asDocument(Object obj); static T loadFromDocument(T obj, ODocument doc); static T save(T obj); static T reload(T obj); static T create(Class<T> interfaceClass, Class<?>... additionalInterfaces); static T create(Class<T> interfaceClass, String className, Class<?>... additionalInterfaces); static T provide(Class<T> interfaceClass, ORID iRID, Class<?>... additionalInterfaces); static T provide(Class<T> interfaceClass, ODocument doc, Class<?>... additionalInterfaces); @SuppressWarnings("unchecked") static T provide(Class<T> interfaceClass, ODocumentWrapper docWrapper, Class<?>... additionalInterfaces); @SuppressWarnings("unchecked") static T dao(Class<T> interfaceClass, Class<?>... additionalInterfaces); static OSchemaHelper describe(OSchemaHelper helper, Class<?>... classes);  }
@Test public void testDAO() { ITestDAO dao = tester.getApplication().getServiceInstance(ITestDAO.class); List<ODocument> testDocs = dao.listDAOTestClass(); assertNotNull(testDocs); assertTrue("Size of test docs", testDocs.size()>0); assertTrue("Size of test docs", dao.countAll()>0); assertEquals(testDocs.size(), dao.countAll()); }