### Question:
Preconditions { @NonNull public static <T extends Collection<?>> T checkCollectionNotEmpty( T collection, @Nullable Object errorMessage) { checkNotNull(collection, errorMessage); checkArgument(!collection.isEmpty(), errorMessage); return collection; } 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(expected = NullPointerException.class) public void testCheckCollectionNotEmpty_withNull() { checkCollectionNotEmpty(null, TEST_MSG); }
@Test(expected = IllegalArgumentException.class) public void testCheckCollectionNotEmpty_withEmptyList() { checkCollectionNotEmpty(new ArrayList<Object>(), TEST_MSG); }
@Test public void testCheckCollectionNotEmpty() { checkCollectionNotEmpty(Arrays.asList("value1", "value2"), TEST_MSG); }