@Test
public void collapse() {

    // Arrange & Act
    final List<String> src = Arrays.asList("a", "a", "b", "bb", "c", "c", "a");
    final Stream<String> collapsed = Streams.collapse(src.stream()).parallel();
    // Assert
    final List<String> expected = Arrays.asList("a", "b", "bb", "c", "a");
    final Object[] actuals = collapsed.toArray();
    Assert.assertArrayEquals(expected.toArray(), actuals);
}