@Test
public void testFormat() throws Exception {
TranslatorMetaDataGroup group = new TranslatorMetaDataGroup();
TranslatorMetaData tm = new TranslatorMetaData();
group.translators.add(tm);
tm.setExecutionFactoryClass(ExecutionFactory.class);
tm.setName("Oracle");
tm.setDescription("desc");
tm.addProperty("ExtensionTranslationClassName", "org.teiid.translator.jdbc.oracle.OracleSQLTranslator");
JAXBContext jc = JAXBContext.newInstance(new Class<?>[] {TranslatorMetaDataGroup.class});
Marshaller marshell = jc.createMarshaller();
marshell.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,new Boolean(true));
StringWriter sw = new StringWriter();
marshell.marshal(group, sw);
System.out.println(sw.toString());
Unmarshaller un = jc.createUnmarshaller();
group = (TranslatorMetaDataGroup)un.unmarshal(new StringReader(sw.toString()));
tm = group.getTranslators().get(0);
assertEquals("Oracle", tm.getName());
assertEquals("desc", tm.getDescription());
assertEquals(ExecutionFactory.class.getName(), tm.getPropertyValue(Translator.EXECUTION_FACTORY_CLASS));
assertEquals("org.teiid.translator.jdbc.oracle.OracleSQLTranslator", tm.getPropertyValue("ExtensionTranslationClassName"));
}