@Test
public void testRegister() {

    Set<URL> registered = null;
    // clear first
    registered = registry.getRegistered();
    for (int i = 0; i < 2; i++) {
        registry.register(serviceUrl);
        registered = registry.getRegistered();
        assertTrue(registered.contains(serviceUrl));
    }
    // confirm only 1 regist success;
    registered = registry.getRegistered();
    assertEquals(1, registered.size());
}