@Test
public void testCreateExtractedMap() {

    Map<Integer, String> map = new HashMap<Integer, String>();
    map.put(0, "value0");
    map.put(1, "value1");
    map.put(2, "value2");
    Set<Integer> set = new HashSet<Integer>();
    set.add(1);
    set.add(2);
    Map<Integer, String> extractedMap = PatternUtil.createExtractedMap(map, set);
    assertEquals(2, extractedMap.size());
    assertEquals("value1", extractedMap.get(1));
    assertEquals("value2", extractedMap.get(2));
}