ThreadId { @Override public String toString() { return myDisplayName; } ThreadId(int threadId);  ThreadId(@NotNull String threadName); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final ThreadId INVALID_THREAD_ID; }
@Test public void displayNameTest() { assertEquals(String.format(DISPLAY_FORMAT, "Unknown"), INVALID_THREAD_ID.toString()); assertEquals(String.format(DISPLAY_FORMAT, "1"), new ThreadId(1).toString()); assertEquals(String.format(DISPLAY_FORMAT, "TestThread"), new ThreadId("TestThread").toString()); }