public static InstrumentedExecutorService newCachedThreadPool(MetricRegistry registry, String name) {
        return new InstrumentedExecutorService(Executors.newCachedThreadPool(), registry, name);
    }
@Test
    public void testNewCachedThreadPool() throws Exception {
        final ExecutorService executorService = InstrumentedExecutors.newCachedThreadPool(registry, "xs");
        executorService.submit(new NoopRunnable());
        executorService.submit(new NoopRunnable());

        assertThat(registry.meter("xs.submitted").getCount()).isEqualTo(2L);

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