Cappuccino { public static void registerIdlingResource(@NonNull Object object) { registerIdlingResource(nameOf(object)); } 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(expected = CappuccinoException.class) public void testRegisteringWithoutResourceWatcherThrowsException() throws Exception { Cappuccino.registerIdlingResource(new Object()); }