### Question:
URLProtocolRegistry { public void reinitialize () { m_aRWLock.writeLocked ( () -> { m_aProtocols.clear (); for (final EURLProtocol aProtocol : EURLProtocol.values ()) m_aProtocols.put (aProtocol.getProtocol (), aProtocol); }); for (final IURLProtocolRegistrarSPI aRegistrar : ServiceLoaderHelper.getAllSPIImplementations (IURLProtocolRegistrarSPI.class)) { final ICommonsSet <? extends IURLProtocol> aURLProtocols = aRegistrar.getAllProtocols (); if (aURLProtocols != null) for (final IURLProtocol aSPIProtocol : aURLProtocols) registerProtocol (aSPIProtocol); } if (LOGGER.isDebugEnabled ()) LOGGER.debug (getRegisteredProtocolCount () + " URL protocols registered"); } private  URLProtocolRegistry(); static boolean isInstantiated(); @Nonnull static URLProtocolRegistry getInstance(); void registerProtocol(@Nonnull final IURLProtocol aProtocol); @Nonnull @ReturnsMutableCopy ICommonsCollection <IURLProtocol> getAllProtocols(); @Nonnegative int getRegisteredProtocolCount(); @Nullable IURLProtocol getProtocol(@Nullable final String sURL); @Nullable IURLProtocol getProtocol(@Nullable final ISimpleURL aURL); boolean hasKnownProtocol(@Nullable final String sURL); boolean hasKnownProtocol(@Nullable final ISimpleURL aURL); @Nullable String getWithoutProtocol(@Nullable final String sURL); void reinitialize();  }### Answer:
@Test public void testReinitialize () { final String sPrefix = "xyz: final URLProtocol aCustom = new URLProtocol (sPrefix, false); final String sTestURL = sPrefix + "abZZ"; assertFalse (URLProtocolRegistry.getInstance ().hasKnownProtocol (sTestURL)); URLProtocolRegistry.getInstance ().registerProtocol (aCustom); assertTrue (URLProtocolRegistry.getInstance ().hasKnownProtocol (sTestURL)); try { URLProtocolRegistry.getInstance ().registerProtocol (aCustom); fail (); } catch (final IllegalArgumentException ex) {} URLProtocolRegistry.getInstance ().reinitialize (); assertFalse (URLProtocolRegistry.getInstance ().hasKnownProtocol (sTestURL)); URLProtocolRegistry.getInstance ().registerProtocol (aCustom); assertTrue (URLProtocolRegistry.getInstance ().hasKnownProtocol (sTestURL)); }