DefaultNamingEnumeration implements NamingEnumeration<NameClassPair> { @Override public boolean hasMoreElements() { return nameClassPairs.hasMoreElements(); } DefaultNamingEnumeration(Collection<NameClassPair> nameClassPairs); @Override void close(); @Override boolean hasMore(); @Override boolean hasMoreElements(); @Override NameClassPair next(); @Override NameClassPair nextElement();  }
@Test public void testHasMoreElements() { DefaultNamingEnumeration enumeration = new DefaultNamingEnumeration(new ArrayList<>()); assertFalse(enumeration.hasMoreElements()); }