Dmo { public abstract CreateEntityCommand cmdCreateEntity(Class<?> entityClass);  static Dmo get(); static Dmo get(String name); abstract OrmContext getOrmContext(); abstract List<DbSchema> getDbSchemas(); abstract DataFactory getDataFactory(); @Dangerous(askForConfirm=true) abstract void truncate(Class<?> entityClass); abstract boolean createTableIfNotExists(Class<?> entityClass); abstract CreateEntityCommand cmdCreateEntity(Class<?> entityClass); abstract CreateTableCommand cmdCreateTable(Class<?> entityClass); abstract CreateTableCommand cmdCreateTable(EntityMapping em); @Dangerous(askForConfirm = true) abstract DropTableCommand cmdDropTable(Class<?> entityClass); abstract UpgradeSchemaCommand cmdUpgradeSchema(Class<?> entityClass); abstract UpgradeSchemaCommand cmdUpgradeSchema(EntityMapping em); abstract UpgradeSchemaCommand cmdUpgradeSchema();  }
@Test public void testCreateSelfRefEntity() { EntityMapping em = metadata.tryGetEntityMapping(SelfRefEntity.class); assertNull(em); dmo.cmdCreateEntity(SelfRefEntity.class).execute(false); em = metadata.tryGetEntityMapping(SelfRefEntity.class); assertNotNull(em); metadata.removeEntityMapping(em); }