Cappuccino { @NonNull public static String nameOf(@NonNull Object object) { String name = object.getClass().getCanonicalName(); name = name != null ? name : object.getClass().getSimpleName(); return name; } private  Cappuccino(); @NonNull static CappuccinoResourceWatcher newIdlingResourceWatcher(@NonNull Object resource); @NonNull static CappuccinoResourceWatcher newIdlingResourceWatcher(@NonNull String name); @NonNull static String nameOf(@NonNull Object object); @NonNull static CappuccinoResourceWatcher getResourceWatcher(@NonNull Object object); @NonNull static CappuccinoResourceWatcher getResourceWatcher(@NonNull String name); static void markAsBusy(@NonNull Object object); static void markAsBusy(@NonNull String name); static void markAsIdle(@NonNull Object object); static void markAsIdle(@NonNull String name); static void registerIdlingResource(@NonNull Object object); static void registerIdlingResource(@NonNull String name); static void unregisterIdlingResource(@NonNull Object object); static void unregisterIdlingResource(@NonNull String name); static void reset(); static void setTagForTesting(@NonNull View view, @Nullable Object tag); static void setTagForTesting(@NonNull View view, @IdRes int key, @Nullable Object tag);  }
@Test public void testNameOf() throws Exception { assertThat(Cappuccino.nameOf(new Object()), is(Object.class.getCanonicalName())); }