Editor { public Resource getContainer() { return container; }  List<Item> getItems(); Resource getContainer();  }
@Test void testGetContainer() { Editor childrenEditor = getItemsEditor(CAROUSEL_PATH); Resource r = childrenEditor.getContainer(); Iterator<String> it = Arrays.asList("item_1", "item_2", "item_3", "item_4", "item_5", "item_6").iterator(); for (Resource child : r.getChildren()) { assertEquals(child.getName(), it.next(), "Child not found."); } }
@Test void testEmptySuffix() { Editor childrenEditor = getItemsEditor(""); Resource resource = childrenEditor.getContainer(); assertNull(resource, "For an empty suffix, expected container resource to be null."); }
@Test void testInvalidSuffix() { Editor childrenEditor = getItemsEditor("/asdf/adf/asdf"); Resource resource = childrenEditor.getContainer(); assertNull(resource, "For an invalid suffix, expected container resource to be null."); }