}
}
@Test
public void testTranslator() {
TranslatorMetaData tm = new TranslatorMetaData();
tm.setExecutionFactoryClass(ExecutionFactory.class);
tm.setName("Oracle");
tm.addProperty("ExtensionTranslationClassName", "org.teiid.translator.jdbc.oracle.OracleSQLTranslator");
// convert to managed object and build the VDB out of MO
ManagedObjectFactory mof = ManagedObjectFactoryBuilder.create();
ManagedObject mo = mof.initManagedObject(tm, null, null);
tm = AdminObjectBuilder.buildAO(mo, TranslatorMetaData.class);
assertEquals("Oracle", tm.getName());
assertEquals(ExecutionFactory.class.getName(), tm.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", tm.getPropertyValue("ExtensionTranslationClassName"));
}