### Question:
EqualsMatcher implements Matcher<T> { @Override public boolean matching(T target) { return ArthasCheckUtils.isEquals(target, pattern); } EqualsMatcher(T pattern); @Override boolean matching(T target);  }### Answer:
@Test public void testMatching(){ Assert.assertTrue(new EqualsMatcher<String>(null).matching(null)); Assert.assertTrue(new EqualsMatcher<String>("").matching("")); Assert.assertTrue(new EqualsMatcher<String>("foobar").matching("foobar")); Assert.assertFalse(new EqualsMatcher<String>("").matching(null)); Assert.assertFalse(new EqualsMatcher<String>("abc").matching("def")); }