@Override
    public Thread newThread(Runnable runnable) {
        String name = mPrefix + mThreadNum.getAndIncrement();
        Thread ret = new Thread(mGroup, runnable, name, 0);
        ret.setDaemon(mDaemon);
        return ret;
    }
@Test
    void testPrefixAndDaemon() {
        NamedThreadFactory factory = new NamedThreadFactory("prefix", true);
        Thread t = factory.newThread(Mockito.mock(Runnable.class));
        assertThat(t.getName(), allOf(containsString("prefix-"), containsString("-thread-")));
        assertTrue(t.isDaemon());
    }