StreamComposition { @SuppressWarnings("varargs") @SafeVarargs public static <T> Stream<T> concat(Stream<T>... streams) { requireNonNullElements(streams); return Stream.of(streams).flatMap(Function.identity()); } private  StreamComposition(); @SuppressWarnings("varargs") @SafeVarargs // Creating a Stream of an array is safe. static Stream<T> concatAndAutoClose(Stream<T>... streams); @SuppressWarnings("varargs") @SafeVarargs // Creating a Stream of an array is safe. static Stream<T> concat(Stream<T>... streams);  }
@Test void concat() { assertNotNull(StreamComposition.concat(a, b, c)); }