11package com .bugsnag .util ;
22
3+ import static org .junit .Assert .assertEquals ;
4+ import static org .junit .Assert .assertFalse ;
5+ import static org .junit .Assert .assertTrue ;
6+
37import org .junit .Before ;
48import org .junit .Test ;
59
913import java .util .Map ;
1014import java .util .Set ;
1115
12- import static org .junit .Assert .assertEquals ;
13- import static org .junit .Assert .assertFalse ;
14- import static org .junit .Assert .assertTrue ;
15-
1616public class FilteredMapTest {
1717
1818 private static final String KEY_UNFILTERED = "unfiltered" ;
@@ -24,6 +24,10 @@ public class FilteredMapTest {
2424
2525 private Map <String , Object > filteredMap ;
2626
27+ /**
28+ * Creates a map with filtered, unfiltered, and nested values
29+ * @throws Exception an exception
30+ */
2731 @ Before
2832 public void setUp () throws Exception {
2933 HashMap <String , Object > map = new HashMap <String , Object >();
@@ -73,7 +77,8 @@ public void testRemove() throws Exception {
7377 map .put (KEY_FILTERED , VAL_FILTERED );
7478
7579 HashMap <String , Object > emptyMap = new HashMap <String , Object >();
76- Map <String , Object > removeMap = new FilteredMap (emptyMap , Collections .singleton (KEY_FILTERED ));
80+ Set <String > filters = Collections .singleton (KEY_FILTERED );
81+ Map <String , Object > removeMap = new FilteredMap (emptyMap , filters );
7782 removeMap .putAll (map );
7883
7984 assertEquals (2 , removeMap .size ());
0 commit comments