ServiceHelper { public ServiceConfiguration loadServiceConfiguration(InputStream xmlStream) throws JAXBException { JAXBContext context = JAXBContext.newInstance(ServiceConfiguration.class); Unmarshaller unmarshaller = context.createUnmarshaller(); return (ServiceConfiguration) unmarshaller.unmarshal(xmlStream); } protected  ServiceHelper(); static ServiceHelper getInstance(); ServiceConfiguration loadServiceConfiguration(InputStream xmlStream);  }
@Test(groups={"all"}) public void testLoadServiceConfiguration() throws Exception { ServiceConfiguration config; config = ServiceHelper.getInstance().loadServiceConfiguration(new ByteArrayInputStream("<service-configuration />".getBytes("ISO-8859-1"))); assertEquals(config.getServices().size(), 0); assertEquals(config.getFactories().size(), 0); }