### Question:
InternalQueries { @NonNull public static List<Object> unmodifiableNonNullList(@Nullable Object[] args) { return args == null || args.length == 0 ? emptyList() : unmodifiableList(asList(args)); } private  InternalQueries(); @NonNull static List<String> unmodifiableNonNullListOfStrings(@Nullable Object[] args); @NonNull static List<String> unmodifiableNonNullListOfStrings(@Nullable List<?> args); @NonNull static List<Object> unmodifiableNonNullList(@Nullable Object[] args); @SuppressWarnings("unchecked") @NonNull static List<T> unmodifiableNonNullList(@Nullable List<T> list); @SuppressWarnings("unchecked") @NonNull static Set<T> unmodifiableNonNullSet(@Nullable Set<T> set); @NonNull static String[] nonNullArrayOfStrings(@Nullable List<String> list); @Nullable static String[] nullableArrayOfStringsFromListOfStrings(@Nullable List<String> list); @Nullable static String[] nullableArrayOfStrings(@Nullable List<Object> list); @NonNull static String nonNullString(@Nullable String str); @Nullable static String nullableString(@Nullable String str); @SuppressWarnings("unchecked") @NonNull static Set<String> nonNullSet(@Nullable Collection<String> collection); @SuppressWarnings("unchecked") @NonNull static Set<String> nonNullSet(@Nullable String[] items); @SuppressWarnings("unchecked") @NonNull static Set<String> nonNullSet(@NonNull String firstItem, @Nullable String[] otherItems);  }### Answer:
@SuppressWarnings("ConstantConditions") @Test public void nullArrayToUnmodifiableNonNullList() { Object[] array = null; assertThat(InternalQueries.unmodifiableNonNullList(array)).isSameAs(emptyList()); }
@Test public void emptyArrayToUnmodifiableNonNullList() { Object[] array = {}; assertThat(InternalQueries.unmodifiableNonNullList(array)).isSameAs(emptyList()); }
@Test public void nonEmptyArrayToUnmodifiableNonNullList() { Object[] array = {"1", "2", "3"}; List<Object> list = InternalQueries.unmodifiableNonNullList(array); assertThat(list).containsExactly(array); }
@Test public void nullItemInArrayToUnmodifiableNonNullList() { Object[] array = {1, null, 3}; List<Object> objects = InternalQueries.unmodifiableNonNullList(array); assertThat(objects).containsExactly(array); }
@SuppressWarnings("ConstantConditions") @Test public void nullListToUnmodifiableNonNullList() { List<String> list = null; assertThat(InternalQueries.unmodifiableNonNullList(list)).isSameAs(emptyList()); }
@Test public void emptyListToUnmodifiableNonNullList() { List<String> list = new ArrayList<String>(); assertThat(InternalQueries.unmodifiableNonNullList(list)).isSameAs(emptyList()); }
@Test public void nonEmptyListToUnmodifiableNonNullList() { List<String> list = asList("1", "2", "3"); List<String> unmodifiableList = InternalQueries.unmodifiableNonNullList(list); assertThat(unmodifiableList).containsExactly("1", "2", "3"); }
@Test public void listToUnmodifiableNonNullListIsReallyUnmodifiable() { List<String> unmodifiableList = InternalQueries.unmodifiableNonNullList(asList("1", "2", "3")); assertThatListIsImmutable(unmodifiableList); }