public synchronized boolean deregister(String id) {
        assert !(Thread.currentThread() instanceof PartitionOperationThread);

        if (!id2InterceptorMap.containsKey(id)) {
            return false;
        }

        Map<String, MapInterceptor> tmpMap = new HashMap<>(id2InterceptorMap);
        MapInterceptor removedInterceptor = tmpMap.remove(id);

        id2InterceptorMap = unmodifiableMap(tmpMap);

        List<MapInterceptor> tmpInterceptors = new ArrayList<>(interceptors);
        tmpInterceptors.remove(removedInterceptor);

        interceptors = unmodifiableList(tmpInterceptors);

        return true;
    }
@Test
    public void testDeregister() {
        registry.register(interceptor.id, interceptor);
        registry.deregister(interceptor.id);

        assertInterceptorRegistryContainsNotInterceptor();
    }