### Question:
InternalQueries { @Nullable public static String[] nullableArrayOfStringsFromListOfStrings(@Nullable List<String> list) { return list == null || list.isEmpty() ? null : list.toArray(new String[list.size()]); } 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:
@Test public void nullListOfStringsToNullableArrayOfStringFromListOfStrings() { assertThat(InternalQueries.nullableArrayOfStringsFromListOfStrings(null)).isNull(); }
@Test public void emptyListOfStringsToNullableArrayOfStringFromListOfStrings() { List<String> list = new ArrayList<String>(); assertThat(InternalQueries.nullableArrayOfStringsFromListOfStrings(list)).isNull(); }
@Test public void nonEmptyListOfStringsToNullableArrayOfStringsFromListOfStrings() { List<String> list = asList("1", "2", "3"); String[] array = InternalQueries.nullableArrayOfStringsFromListOfStrings(list); assertThat(array).containsExactly("1", "2", "3"); }