S3NameOrderPrefixFileExplorer extends S3PrefixFileExplorer { @Override protected boolean hasNext() { return lastPath != null; } S3NameOrderPrefixFileExplorer(final String bucketName, final AmazonS3 s3Client, final RetryExecutor retryExecutor,
            final String pathPrefix, final boolean skipGlacierObjects, final String lastPath);   }
@Test public void hasNext_should_return_false_if_no_lastpath() throws NoSuchFieldException { new FieldSetter(s3NameOrderPrefixFileExplorer, s3NameOrderPrefixFileExplorer.getClass().getDeclaredField("lastPath")).set(null); assertFalse(s3NameOrderPrefixFileExplorer.hasNext()); }