Here you can find the source of assertHasText(String str)
public static void assertHasText(String str)
//package com.java2s; //License from project: Apache License public class Main { public static void assertHasText(String str) { if (!hasText(str)) throw new IllegalArgumentException("no text in str"); }/*from w ww .j ava 2s . c o m*/ public static boolean hasText(String str) { if (!hasLength(str)) { return false; } int strLen = str.length(); for (int i = 0; i < strLen; i++) { if (!Character.isWhitespace(str.charAt(i))) { return true; } } return false; } public static boolean hasLength(String str) { return (str != null && str.length() > 0); } }