public static InstrumentedThreadFactory privilegedThreadFactory(MetricRegistry registry, String name) {
        return new InstrumentedThreadFactory(Executors.privilegedThreadFactory(), registry, name);
    }
@Test
    public void testPrivilegedThreadFactory() throws Exception {
        final ThreadFactory threadFactory = InstrumentedExecutors.privilegedThreadFactory(registry);
        threadFactory.newThread(new NoopRunnable());

        final Field delegateField = InstrumentedThreadFactory.class.getDeclaredField("delegate");
        delegateField.setAccessible(true);
        final ThreadFactory delegate = (ThreadFactory) delegateField.get(threadFactory);
        assertThat(delegate.getClass().getCanonicalName()).isEqualTo("java.util.concurrent.Executors.PrivilegedThreadFactory");
    }