public void test() { InputStream is = getClass().getResourceAsStream("/hostedservice.xml"); HostedService expected = expected(); HostedServiceHandler handler = injector.getInstance(HostedServiceHandler.class); HostedService result = factory.create(handler).parse(is); assertEquals(result.toString(), expected.toString()); }
public HostedService expected() { return HostedService.builder() .url( URI.create( "https://management.core.windows.net/eb0347c3-68d4-4550-9b39-5e7e0f92f7db/services/hostedservices/neotys")) .name("neotys") .properties( HostedServiceProperties.builder() .description("Implicitly created hosted service2012-08-06 14:55") .location("West Europe") .label("neotys") .build()) .build(); }