XStreamFactory { public static XStream createXStream() { XStream xStream = new XStream(); xStream.alias("configuration", OBridgeConfiguration.class); return xStream; } private  XStreamFactory(); static XStream createXStream();  }
@Test public void testCreateXStream() throws IOException { XStream x = XStreamFactory.createXStream(); OBridgeConfiguration obc = new OBridgeConfiguration(); obc.setJdbcUrl(connectionString); obc.setSourceRoot(File.createTempFile("ObjectGenerator", Long.toString(System.nanoTime())).getParentFile().toString()); obc.setRootPackageName("hu.obridge.test"); obc.setPackages(new Packages()); String s = x.toXML(obc); System.out.println(s); Assert.assertTrue("starts with <configuration>", s.startsWith("<configuration>")); }