ContentFragmentImpl implements ContentFragment { @Nullable @Override public List<DAMContentElement> getElements() { return damContentFragment.getElements(); }  @Nullable @Override String getTitle(); @Nullable @Override String getDescription(); @Nullable @Override String getType(); @Nullable @Override String getName(); @NotNull @Override String getGridResourceType(); @NotNull @Override String getEditorJSON(); @NotNull @Override Map<String, DAMContentElement> getExportedElements(); @NotNull @Override String[] getExportedElementsOrder(); @Nullable @Override List<DAMContentElement> getElements(); @Nullable @Override List<Resource> getAssociatedContent(); @NotNull @Override String getExportedType(); @NotNull @Override Map<String, ? extends ComponentExporter> getExportedItems(); @NotNull @Override String[] getExportedItemsOrder(); @Nullable @Override String[] getParagraphs(); static final String RESOURCE_TYPE; }
@Test void getElements() { ContentFragment fragment = getModelInstanceUnderTest(CF_TEXT_ONLY); final Map<String, DAMContentFragment.DAMContentElement> elements = fragment.getExportedElements(); assertNotNull(elements); assertEquals(2, elements.size()); assertTrue(elements.containsKey("main")); assertTrue(elements.containsKey("second")); }