ResourceMedia { public boolean isValid() { return media.isValid(); }  Media getMetadata(); boolean isValid(); String getMarkup();  }
@Test void testMedia() { context.currentResource("/content/wcm-io-samples/en/jcr:content/teaserbar/teaserbaritem"); context.request().setAttribute("mediaFormat", "content_480"); ResourceMedia underTest = context.request().adaptTo(ResourceMedia.class); assertTrue(underTest.isValid()); }