Matcher<PropertyChangeEvent> matcher = new PropertyEventNameMatcher(true, new String[] {"test", null});
assertEquals(true, matcher.matches(event1));
assertEquals(true, matcher.matches(event2));
assertEquals(false, matcher.matches(event3));
assertEquals(false, matcher.matches(event4));
assertEquals(true, matcher.matches(event5));
matcher = new PropertyEventNameMatcher(false, new String[] {"test", null});
assertEquals(false, matcher.matches(event1));
assertEquals(false, matcher.matches(event2));
assertEquals(true, matcher.matches(event3));