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