### Question:
HTMLPane extends HTMLFlow { @VaadinIntegration public void setIFrameResource(Resource resource) { setContentsResource(resource); if (!isDrawn()) { setContentsType(ContentsType.PAGE); } else { assert getContentsType() == ContentsType.PAGE : "This method cannot be called on a HTMLPane that has a contentsType other than PAGE"; } } HTMLPane(); void setIFrameURL(String url); @VaadinIntegration void setIFrameResource(Resource resource);  }### Answer:
@Test public void test_settingIFrameResourceSetsContentsResource() { final Resource resource = mock(Resource.class); htmlPane.setIFrameResource(resource); assertEquals(resource, htmlPane.getContentsResource()); }
@Test public void test_settingIFrameResourceSetsContentsPageWhenNotDrawn() { htmlPane.setIFrameResource(mock(Resource.class)); assertEquals(ContentsType.PAGE, htmlPane.getContentsType()); }