@Test public void testCreateObject() throws Exception { ServicePaths servicePaths = new ServicePaths(); List<Paths> pathsList = new ArrayList<Paths>(); for (int y = 0; y < 2; y++) { String serviceName = "serviceName" + y; List<PathItem> stacks = new ArrayList<PathItem>(); List<PathItem> flavours = new ArrayList<PathItem>(); for (int i = 0; i < 2; i++) { PathItem stacksPathItem = new PathItem(); stacksPathItem.setActiveNodesCount(i); stacksPathItem.setValue("stackPathValue" + i); stacks.add(stacksPathItem); PathItem flavoursPathItem = new PathItem(); flavoursPathItem.setActiveNodesCount(i); flavoursPathItem.setValue("flavoursPathValue" + i); flavours.add(flavoursPathItem); } Paths newPaths = new Paths(serviceName, stacks, flavours); pathsList.add(newPaths); } servicePaths.setPaths(pathsList); String result = serializeIt(servicePaths, false); Assert.assertNotNull(result); Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><servicePaths><paths serviceName=\"serviceName0\"><stack nodes=\"0\" nodesWhitelisted=\"0\">stackPathValue0</stack><stack nodes=\"1\" nodesWhitelisted=\"0\">stackPathValue1</stack><flavor nodes=\"0\" nodesWhitelisted=\"0\">flavoursPathValue0</flavor><flavor nodes=\"1\" nodesWhitelisted=\"0\">flavoursPathValue1</flavor></paths><paths serviceName=\"serviceName1\"><stack nodes=\"0\" nodesWhitelisted=\"0\">stackPathValue0</stack><stack nodes=\"1\" nodesWhitelisted=\"0\">stackPathValue1</stack><flavor nodes=\"0\" nodesWhitelisted=\"0\">flavoursPathValue0</flavor><flavor nodes=\"1\" nodesWhitelisted=\"0\">flavoursPathValue1</flavor></paths></servicePaths>", result); }
public void setPaths(List<Paths> paths) { this.paths = paths; }
ServicePaths { public void setPaths(List<Paths> paths) { this.paths = paths; } }
ServicePaths { public void setPaths(List<Paths> paths) { this.paths = paths; } ServicePaths();  ServicePaths(List<Paths> paths); }
ServicePaths { public void setPaths(List<Paths> paths) { this.paths = paths; } ServicePaths();  ServicePaths(List<Paths> paths); List<Paths> getPaths(); Paths getPaths(String serviceName); void setPaths(List<Paths> paths); @Override boolean equals(Object o); @Override int hashCode(); }
ServicePaths { public void setPaths(List<Paths> paths) { this.paths = paths; } ServicePaths();  ServicePaths(List<Paths> paths); List<Paths> getPaths(); Paths getPaths(String serviceName); void setPaths(List<Paths> paths); @Override boolean equals(Object o); @Override int hashCode();  }