### Question:
FileReader implements Iterable<Elements> { Elements getHeadings() throws FileReaderException { if (this.headings == null) { this.iterator(); } return this.headings; } FileReader(Source source, String selector, Integer index);  FileReader(Source source, String selector);  FileReader(Source source); @Override FileReaderIterator iterator(); void close();  }### Answer:
@Test void testFileReaderHeadings() throws FileReaderException { final Source source = resource("tableOK.html"); FileReader t = new FileReader(source); Elements headings = t.getHeadings(); assertTrue(headings.get(1).text().equals("H1")); }
@Test void testFileReaderHeadingsBadFile() throws FileReaderException { final Source source = resource("tableNoTheadTbody.html"); FileReader t = new FileReader(source); Elements headings = t.getHeadings(); assertTrue(headings.get(1).text().equals("H1")); }