Skip to content

Instantly share code, notes, and snippets.

@wsoczynski
Created March 16, 2013 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wsoczynski/5178381 to your computer and use it in GitHub Desktop.
Save wsoczynski/5178381 to your computer and use it in GitHub Desktop.
public class TransformAndConcatTest{
@Test
public void testTransformAndConcat() throws Exception {
//given
List<List<Integer>> input = newLinkedList();
for (int i = 0; i < 10; i++) {
List<Integer> subList = newLinkedList();
for (int j = 0; j < 10; j++) {
subList.add(j);
}
input.add(subList);
}
//when
ImmutableList<Integer> result = FluentIterable.from(input).
transformAndConcat(Functions.<List<Integer>>identity()).
toList();
//then
assertEquals(100, result.size());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment