public static InstrumentedExecutorService newFixedThreadPool(int nThreads, MetricRegistry registry, String name) {
        return new InstrumentedExecutorService(Executors.newFixedThreadPool(nThreads), registry, name);
    }
@Test
    public void testNewFixedThreadPoolWithThreadFactory() throws Exception {
        final ExecutorService executorService = InstrumentedExecutors.newFixedThreadPool(2, defaultThreadFactory, registry);
        executorService.submit(new NoopRunnable());

        final Field delegateField = InstrumentedExecutorService.class.getDeclaredField("delegate");
        delegateField.setAccessible(true);
        final ThreadPoolExecutor delegate = (ThreadPoolExecutor) delegateField.get(executorService);
        assertThat(delegate.getCorePoolSize()).isEqualTo(2);
        assertThat(delegate.getMaximumPoolSize()).isEqualTo(2);
        assertThat(delegate.getThreadFactory()).isSameAs(defaultThreadFactory);
        executorService.shutdown();
    }