### Question:
Preconditions { @NonNull public static String checkNotEmpty(String str, @Nullable Object errorMessage) { checkNotNull(str, errorMessage); checkArgument(!TextUtils.isEmpty(str), errorMessage); return str; } private  Preconditions(); static T checkNotNull(T reference); static T checkNotNull(T reference, @Nullable Object errorMessage); @NonNull static String checkNotEmpty(String str, @Nullable Object errorMessage); @NonNull static T checkCollectionNotEmpty(
            T collection, @Nullable Object errorMessage); @NonNull static String checkNullOrNotEmpty(String str, @Nullable Object errorMessage); static void checkArgument(boolean expression); static void checkArgument(boolean expression, @Nullable Object errorMessage); static void checkArgument(
            boolean expression,
            @NonNull String errorTemplate,
            Object... params);  }### Answer:
@Test public void testCheckNotEmpty() { String testString = "I am not empty"; assertSame(testString, checkNotEmpty(testString, TEST_MSG)); }
@Test(expected = NullPointerException.class) public void testCheckNotEmpty_nullString() { checkNotEmpty(null, TEST_MSG); }
@Test(expected = IllegalArgumentException.class) public void testCheckNotEmpty_emptyString() { checkNotEmpty("", TEST_MSG); }