@Test
public void testIntersection() {

    Set<String> a = new HashSet<>();
    a.add("foo");
    a.add("bar");
    a.add("baz");
    a.add("qux");
    Set<String> b = new HashSet<>();
    b.add("bar");
    b.add("baz");
    Set<String> intersection = Sets.intersection(a, b);
    assertEquals(2, intersection.size());
    assertTrue(intersection.contains("bar"));
    assertTrue(intersection.contains("baz"));
}