Timber { public static void uproot(Tree tree) { synchronized (FOREST) { if (!FOREST.remove(tree)) { throw new IllegalArgumentException("Cannot uproot tree which is not planted: " + tree); } forestAsArray = FOREST.toArray(new Tree[FOREST.size()]); } } private  Timber(); static void v(@NonNls String message, Object... args); static void v(Throwable t, @NonNls String message, Object... args); static void d(@NonNls String message, Object... args); static void d(Throwable t, @NonNls String message, Object... args); static void i(@NonNls String message, Object... args); static void i(Throwable t, @NonNls String message, Object... args); static void w(@NonNls String message, Object... args); static void w(Throwable t, @NonNls String message, Object... args); static void e(@NonNls String message, Object... args); static void e(Throwable t, @NonNls String message, Object... args); static void wtf(@NonNls String message, Object... args); static void wtf(Throwable t, @NonNls String message, Object... args); static void log(int priority, @NonNls String message, Object... args); static void log(int priority, Throwable t, @NonNls String message, Object... args); static Tree asTree(); static Tree tag(String tag); static void plant(Tree tree); static void uproot(Tree tree); static void uprootAll(); static List<Tree> forest(); static int treeCount();  }
@Test public void uprootThrowsIfMissing() { try { Timber.uproot(new Timber.DebugTree()); fail(); } catch (IllegalArgumentException e) { assertThat(e).hasMessageStartingWith("Cannot uproot tree which is not planted: "); } }