@Test public void shouldReturnNamedThread(@Injectable Thread testThread) { Thread actualThread = testUdpServiceThreadFactory.newThread(testThread); assertEquals(expectedName, actualThread.getName()); }
@Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName(this.threadName); return t; }
UdpServiceThreadFactory implements ThreadFactory { @Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName(this.threadName); return t; } }
UdpServiceThreadFactory implements ThreadFactory { @Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName(this.threadName); return t; } UdpServiceThreadFactory(String name); }
UdpServiceThreadFactory implements ThreadFactory { @Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName(this.threadName); return t; } UdpServiceThreadFactory(String name); @Override Thread newThread(Runnable r); String getThreadName(); void setThreadName(String threadName); }
UdpServiceThreadFactory implements ThreadFactory { @Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName(this.threadName); return t; } UdpServiceThreadFactory(String name); @Override Thread newThread(Runnable r); String getThreadName(); void setThreadName(String threadName);  }