assertEquals(0, collection.getLinks().size());
}
@Test
public void parseSingleItemCollection() throws IOException {
Collection collection = parser.parse(new InputStreamReader(getClass().getResourceAsStream("/item.json")));
assertNotNull(collection);
assertEquals(URI.create("http://example.org/friends/"), collection.getHref().orElse(null));
assertEquals(3, collection.getLinks().size());
assertEquals(1, collection.getItems().size());
Optional<Item> item = collection.getFirstItem();
assertTrue("Item was null", item.isPresent());
assertEquals(URI.create("http://example.org/friends/jdoe"), item.get().getHref().orElse(null));
assertEquals(Property.value("full-name", Optional.of("Full Name"), ValueFactory.createOptionalValue("J. Doe")), item.get().getData().get(0).get());
assertEquals(2, item.get().getLinks().size());
}