### Question:
ContainingPageReportCellCSVExporter implements ReportCellCSVExporter { @Override public String getValue(Object obj) { Resource result = (Resource) obj; PageManager pageMgr = result.getResourceResolver().adaptTo(PageManager.class); return Optional.ofNullable(pageMgr).map(p -> p.getContainingPage(result)).map(Page::getPath).orElse(""); }  @Override String getValue(Object obj);  }### Answer:
@Test public void testExporter() { log.info("testExporter"); ContainingPageReportCellCSVExporter valid = new ContainingPageReportCellCSVExporter(); String value = valid.getValue(validResource); assertEquals(VALID_PATH, value); log.info("Test successful!"); }
@Test public void testInvalidPage() { log.info("testInvalidPage"); ContainingPageReportCellCSVExporter invalid = new ContainingPageReportCellCSVExporter(); String value = invalid.getValue(invalidResource); assertEquals("", value); log.info("Test successful!"); }