### Question:
Utils { public static boolean isNullOrEmpty(final Collection<?> list) { return list == null || list.size() == 0; }  static float clamp(float min, float max, float value); static float getViewRawY(View view); static void setTint(Context context, CheckBox box, int color); static String getDate(@NonNull Context c, long f); @SuppressWarnings("deprecation") static int getColor(Context c, @ColorRes int color); static int dpToPx(Context c, int dp); static String differenceStrings(String str1, String str2); static void disableScreenRotation(@NonNull Activity activity); static void enableScreenRotation(@NonNull Activity activity); static boolean isDeviceInLandScape(Activity activity); static String sanitizeInput(String input); static Uri getUriForBaseFile(
      @NonNull Context context, @NonNull HybridFileParcelable baseFile); static int nthToLastCharIndex(int elementNumber, String str, char element); static String formatTimer(long timerInSeconds); @TargetApi(Build.VERSION_CODES.N) static File getVolumeDirectory(StorageVolume volume); static boolean isNullOrEmpty(final Collection<?> list); static boolean isNullOrEmpty(final String string); static void invalidateFab(
      MainActivity mainActivity, @Nullable Runnable callback, boolean open); static Snackbar showThemedSnackbar(
      MainActivity mainActivity,
      CharSequence text,
      int length,
      @StringRes int actionTextId,
      Runnable actionCallback);  }### Answer:
@Test public void testIsNullOrEmptyCollection() { assertTrue(Utils.isNullOrEmpty((Collection<Void>) null)); assertTrue(Utils.isNullOrEmpty(Collections.EMPTY_SET)); assertFalse(Utils.isNullOrEmpty(Collections.singletonList(null))); assertFalse(Utils.isNullOrEmpty(Arrays.asList(new Object()))); Collection<Object> l = new ArrayList<Object>(); l.add(new Object()); assertFalse(Utils.isNullOrEmpty(l)); }
@Test public void testIsNullOrEmptyString() { assertTrue(Utils.isNullOrEmpty((String) null)); assertTrue(Utils.isNullOrEmpty("")); assertFalse(Utils.isNullOrEmpty("null")); assertFalse(Utils.isNullOrEmpty("empty")); assertFalse(Utils.isNullOrEmpty("this is a string")); }