@Test
public void testHasNext() throws IOException {
AbstractImageBundle aib = createImageBundleAndOpen(AbstractImageBundle.FILE_MODE_READ);
FloatImage source, image;
ImageDecoder decoder = JPEGImageUtil.getInstance();
assertTrue("first trial fail to assert hasNext", aib.hasNext());
assertTrue("second trial fail to assert hasNext", aib.hasNext());
assertTrue("third trial fail to assert hasNext", aib.hasNext());
aib.next();
source = decoder.decodeImage(new FileInputStream("data/test/ImageBundleTestCase/read/0.jpg"));
image = aib.getCurrentImage();
assertEquals("first image fails", source, image);
assertTrue("first trial fail to assert hasNext", aib.hasNext());
assertTrue("second trial fail to assert hasNext", aib.hasNext());
assertTrue("third trial fail to assert hasNext", aib.hasNext());
aib.next();
source = decoder.decodeImage(new FileInputStream("data/test/ImageBundleTestCase/read/1.jpg"));
image = aib.getCurrentImage();
assertEquals("second image fails", source, image);
assertFalse("first trial fail to assert hasNext", aib.hasNext());
assertFalse("second trial fail to assert hasNext", aib.hasNext());
assertFalse("third trial fail to assert hasNext", aib.hasNext());