@Test public void collectionOfExperiments() throws Exception { String testbedsXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<collection xmlns=\"http: + "<items offset=\"0\" total=\"2\">" + "<provider href=\"/101\">" + "<id>101</id>" + "<name>provider1</name>" + "<endpoint>http1</endpoint>" + "<link rel=\"parent\" href=\"/\" type=\"application/xml\" />" + "<link rel=\"self\" href=\"/101\" type=\"application/xml\" />" + "</provider>" + "<provider href=\"/102\">" + "<id>102</id>" + "<name>provider2</name>" + "<endpoint>http2</endpoint>" + "<link rel=\"parent\" href=\"/\" type=\"application/xml\" />" + "<link rel=\"self\" href=\"/102\" type=\"application/xml\" />" + "</provider>" + "</items>" + "<link href=\"/\" rel=\"self\" type=\"application/xml\"/>" + "</collection>"; JAXBContext jaxbContext = JAXBContext.newInstance(Collection.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); Collection collection = (Collection) jaxbUnmarshaller.unmarshal(new StringReader(testbedsXML)); assertEquals(2, collection.getItems().getProviders().size()); assertEquals(102, collection.getItems().getProviders().get(1).getId()); }
public Items getItems() { return items; }
Collection { public Items getItems() { return items; } }
Collection { public Items getItems() { return items; }  }
Collection { public Items getItems() { return items; }  String getHref(); void setHref(String href); Items getItems(); void setItems(Items items); ArrayList<Link> getLinks(); void setLinks(ArrayList<Link> links); void addLink(Link link); }
Collection { public Items getItems() { return items; }  String getHref(); void setHref(String href); Items getItems(); void setItems(Items items); ArrayList<Link> getLinks(); void setLinks(ArrayList<Link> links); void addLink(Link link);  }