@@ -0,0 +1,1560 @@
+/*%0A * Copyright 2013-present Facebook, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A * not use this file except in compliance with the License. You may obtain%0A * a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A * License for the specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage com.facebook.buck.util;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertNotNull;%0A%0Aimport com.google.common.util.concurrent.Runnables;%0A%0Aimport org.junit.Test;%0A%0Aimport java.lang.Thread.State;%0A%0A/**%0A * Unit tests for %7B@link Threads%7D class.%0A */%0Apublic class ThreadsTest %7B%0A%0A  @Test%0A  public void testNamedThread() %7B%0A    String name = %22test%22;%0A    Runnable runnable = Runnables.doNothing();%0A%0A    Thread thread = Threads.namedThread(name, runnable);%0A%0A    assertNotNull(thread);%0A    assertFalse(thread.isDaemon());%0A    assertEquals(State.NEW, thread.getState());%0A    assertEquals(name, thread.getName());%0A  %7D%0A%0A  @Test(expected = NullPointerException.class)%0A  public void testNamedThreadWithNullName() %7B%0A    Threads.namedThread(null, Runnables.doNothing());%0A  %7D%0A%0A  @Test%0A  public void testNamedThreadWithNullJob() %7B%0A    assertNotNull(Threads.namedThread(%22test%22, null));%0A  %7D%0A%0A%7D%0A

Add unit tests for "Threads" class