@Override
 public boolean hasNext() throws IOException {
   // Iterate through zip file entries.
   if (mNextZipEntry == null) {
     do {
       if (mAborterProvider.get().isAborted()) break;
       mNextZipEntry = mZipInputStream.getNextEntry();
     } while (mNextZipEntry != null && !mZipInputFileTester.isValid(mNextZipEntry));
   }
   return mNextZipEntry != null;
 }
  @Test
  public void testZipFileIter_HasNextNone() throws Exception {
    GpxZipInputStream zipInputStream = PowerMock.createMock(GpxZipInputStream.class);
    Aborter aborter = PowerMock.createMock(Aborter.class);

    expect(aborter.isAborted()).andReturn(false);
    expect(zipInputStream.getNextEntry()).andReturn(null);

    PowerMock.replayAll();
    assertFalse(new ZipFileIter(zipInputStream, aborter, null).hasNext());
    PowerMock.verifyAll();
  }
  @Test
  public void testZipFileIter_HasNextTrue() throws Exception {
    GpxZipInputStream zipInputStream = PowerMock.createMock(GpxZipInputStream.class);
    ZipEntry zipEntry = PowerMock.createMock(ZipEntry.class);
    Aborter aborter = PowerMock.createMock(Aborter.class);
    ZipInputFileTester zipInputFileTester = PowerMock.createMock(ZipInputFileTester.class);

    expect(aborter.isAborted()).andReturn(false);
    expect(zipInputStream.getNextEntry()).andReturn(zipEntry);
    expect(zipInputFileTester.isValid(zipEntry)).andReturn(true);

    PowerMock.replayAll();
    assertTrue(new ZipFileIter(zipInputStream, aborter, zipInputFileTester, null).hasNext());
    PowerMock.verifyAll();
  }