TitleImpl extends AbstractComponentImpl implements Title { @Override public String getType() { if (heading != null) { return heading.getElement(); } return null; }  @Override String getText(); @Override String getType(); @Override String getLinkURL(); @Override boolean isLinkDisabled(); @NotNull @Override String getExportedType(); @Override String getDataLayerLinkUrl(); @Override String getDataLayerTitle();  }
@Test void testGetTitleFromResource() { Title title = getTitleUnderTest(TITLE_RESOURCE_JCR_TITLE); assertNull(title.getType()); Utils.testJSONExport(title, Utils.getTestExporterJSONPath(TEST_BASE, TITLE_RESOURCE_JCR_TITLE)); }
@Test void testGetTitleResourcePageStyleType() { Title title = getTitleUnderTest(TITLE_NOPROPS, Title.PN_DESIGN_DEFAULT_TYPE, "h2"); assertEquals("h2", title.getType()); Utils.testJSONExport(title, Utils.getTestExporterJSONPath(TEST_BASE, TITLE_NOPROPS)); }
@Test void testGetTitleFromCurrentPageWithWrongElementInfo() { Title title = getTitleUnderTest(TITLE_WRONGTYPE); assertNull(title.getType()); Utils.testJSONExport(title, Utils.getTestExporterJSONPath(TEST_BASE, TITLE_WRONGTYPE)); }