示例#1
0
  @Test
  public void testGetCollection() {
    Collectors<String> collectors =
        new Collectors<String>(createCollector("a", "b", "c"), createCollector("b", "d", "e"));

    Collection<String> result = collectors.getCollection();
    assertCollectionContains(result, "a", "b", "c", "d", "e");
  }
示例#2
0
  @Test
  public void testAddCollection() {
    Collectors<String> collectors = new Collectors<String>();
    collectors.addCollection(Arrays.asList("a", "b", "c"));
    collectors.addCollection(Arrays.asList("b", "d", "e"));

    Collection<String> result = collectors.getCollection();
    assertCollectionContains(result, "a", "b", "c", "d", "e");
  }