### Question:
AbstractRegistry implements Registry { @Override public void register(URL url) { if (url == null) { throw new IllegalArgumentException("register url == null"); } if (logger.isInfoEnabled()) { logger.info("Register: " + url); } registered.add(url); } AbstractRegistry(URL url); @Override URL getUrl(); Set<URL> getRegistered(); Map<URL, Set<NotifyListener>> getSubscribed(); Map<URL, Map<String, List<URL>>> getNotified(); File getCacheFile(); Properties getCacheProperties(); AtomicLong getLastCacheChanged(); void doSaveProperties(long version); List<URL> getCacheUrls(URL url); @Override List<URL> lookup(URL url); @Override void register(URL url); @Override void unregister(URL url); @Override void subscribe(URL url, NotifyListener listener); @Override void unsubscribe(URL url, NotifyListener listener); @Override void destroy(); @Override String toString();  }### Answer:
@Test public void testRegister() throws Exception { abstractRegistry.register(mockUrl); assert abstractRegistry.getRegistered().contains(mockUrl); abstractRegistry.getRegistered().clear(); List<URL> urlList = getList(); for (URL url : urlList) { abstractRegistry.register(url); } MatcherAssert.assertThat(abstractRegistry.getRegistered().size(), Matchers.equalTo(urlList.size())); }