CommonUtils { public static boolean isNonEmptyString(String stringToCheck) { return (stringToCheck != null && stringToCheck.length() > 0); }  static boolean isLollipopOrHigher(); static boolean isMarshmallowOrHigher(); @TargetApi(23) static boolean isPermissionGranted(String permission, Activity activity); static boolean isValidBluetoothMacAddress(String bluetoothMacAddress); static void setMockedValue(Field originalField, Object parentObject, Object newValue); static boolean isNonEmptyString(String stringToCheck); static String byteArrayToHexString(byte[] bytes, boolean addSpacesBetweenBytes);  }
@Test public void testIsNonEmptyString() throws Exception { assertThat("Should return false if null provided as a string", CommonUtils.isNonEmptyString(null), is(false)); assertThat("Should return false if empty string provided", CommonUtils.isNonEmptyString(""), is(false)); assertThat("Should return true if non empty string provided", CommonUtils.isNonEmptyString("some text"), is(true)); }