### 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 public void testFileReaderHeadings() throws FileReaderException { final Source source = Sources.file( null, file( "build/test-classes/tableOK.html" ) ); FileReader t = new FileReader( source ); Elements headings = t.getHeadings(); assertTrue( headings.get( 1 ).text().equals( "H1" ) ); }
@Test public void testFileReaderHeadingsBadFile() throws FileReaderException { final Source source = Sources.file( null, file( "build/test-classes/tableNoTheadTbody.html" ) ); FileReader t = new FileReader( source ); Elements headings = t.getHeadings(); assertTrue( headings.get( 1 ).text().equals( "H1" ) ); }