### Question:
JAXWSAdapterRegistry { public void addAdapter(String contextRoot, String urlPattern, Adapter info) { if (contextRoot == null) contextRoot = ""; synchronized (store) { ContextAdapter contextRtInfo = store.get(contextRoot); if(contextRtInfo == null) { contextRtInfo = new ContextAdapter(); } contextRtInfo.addAdapter(urlPattern, info); store.put(contextRoot, contextRtInfo); } } private  JAXWSAdapterRegistry(); static synchronized JAXWSAdapterRegistry getInstance(); void addAdapter(String contextRoot, String urlPattern, 
            Adapter info); Adapter getAdapter(String contextRoot,
             String path, String urlPattern ); void removeAdapter(String contextRoot);  }### Answer:
@Test public void testAddAdapter() { final String contextRoot = "/cr"; final String urlPattern = "/up"; final JAXWSAdapterRegistry registry = JAXWSAdapterRegistry.getInstance(); int size = 25; Thread[] ts = new Thread[size]; for (int i = 0; i < size; i++) { final int j = i; ts[i] = new Thread(new Runnable() { @Override public void run() { registry.addAdapter(contextRoot, urlPattern + j, new A(j)); } }); } for (int i = 0; i < size; i++) ts[i].start(); for (int i = 0; i < size; i++) { try { ts[i].join(); } catch (InterruptedException ex) { } } for (int i = 0; i < size; i++) { Adapter a = registry.getAdapter(contextRoot, urlPattern + i, urlPattern + i); Assert.assertNotNull("No adapter for '" + contextRoot + urlPattern + i + "'", a); Assert.assertEquals(i, ((A)a).getX()); } }