AmazonSQSIterator implements Iterator<List<Message>>, Closeable { @Override public boolean hasNext() { return hasMore; } AmazonSQSIterator(final AmazonSQS sqs, final String queueUrl); @Override boolean hasNext(); @Override List<Message> next(); boolean deleteMessage(@Nullable final Message message); @Override void close();  }
@Test public void testHasNext() throws Exception { assertThat(iterator.hasNext()).isTrue(); }