### Question:
StreamUtils { public static <T,U,R> Stream<R> merge(Stream<T> seq1, Stream<U> seq2, BiPredicate<T,U> pred, BiFunction<T,U,R> transf, U defaultVal) { return null; }  static Stream<R> merge(Stream<T> seq1, Stream<U> seq2, BiPredicate<T,U> pred, BiFunction<T,U,R> transf, U defaultVal);  }### Answer:
@Test public void shouldMergeSequencesWithoutDuplicatesOnSeq2Ascending() { final List<String> merged = merge(seq2Asc); assertEquals(expected, merged); }
@Test public void shouldMergeSequencesWithoutDuplicatesOnSeq2AscendingWithDuplicates() { final List<String> merged = merge(seq2AscDupl); assertEquals(expected, merged); }
@Test public void shouldMergeSequencesWithDuplicatesOnSeq2Descending() { final List<String> merged = merge(seq2Desc); assertEquals(expected, merged); }
@Test public void shouldMergeSequencesWithDuplicatesOnSeq2DescendingWithDuplicates() { final List<String> merged = merge(seq2DescDupl); assertEquals(expected, merged); }
@Test public void shouldMergeSequencesWithDuplicatesOnBothSequences() { final List<String> merged = merge( Stream.concat(seq1.stream(), seq1.stream()).collect(Collectors.toList()), seq2DescDupl); assertEquals(Stream.concat(expected.stream(), expected.stream()).collect(toList()), merged); }