@Test
    public void testPageIterator() throws IOException, TesseractException {
        ImageAnalyzerFactory factory = TestContext.getImageAnaylzerFactory();
        try {
            ImageAnalyzer analyzer = TestContext.getImageAnalyzer(factory, TestContext.poetryImageFile);
            
            LayoutIterator iterator = analyzer.analyzeLayout();
            assertNotNull("Failed to create iterator", iterator);

            do {
                @SuppressWarnings("unused")
                BoundingBox box = iterator.getBoundingBox(Level.TEXTLINE);
            } while (iterator.next(Level.TEXTLINE));
            
            iterator.close();
            analyzer.close();
        } finally {
            if (factory != null)
                factory.close();
        }
    }