### Question:
TypeMatcher implements Predicate<OpenNode<? extends Object, ?>> { @Override public boolean equals(Object o) { if (o == null) { return false; } else if (o == this) { return true; } else if (o.getClass().equals(getClass())) { final TypeMatcher matcher = (TypeMatcher)o; return matcher.type.equals(type); } else { return false; } } TypeMatcher(Class<?> type); @Override boolean test(OpenNode<? extends Object, ?> node); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals() { final TypeMatcher matcher0 = new TypeMatcher(String.class); final TypeMatcher matcher1 = new TypeMatcher(String.class); assertTrue(matcher0.equals(matcher1)); assertTrue(matcher1.equals(matcher0)); assertEquals(matcher0.hashCode(), matcher1.hashCode()); }
@Test public void testEqualsSelf() { final TypeMatcher matcher0 = new TypeMatcher(String.class); assertTrue(matcher0.equals(matcher0)); }
@Test public void testNotEquals0() { final TypeMatcher matcher0 = new TypeMatcher(String.class); final TypeMatcher matcher1 = new TypeMatcher(Integer.class); assertFalse(matcher0.equals(matcher1)); }
@Test public void testNotEquals1() { final TypeMatcher matcher0 = new TypeMatcher(String.class); assertFalse(matcher0.equals(null)); }
@Test public void testNotEquals2() { final TypeMatcher matcher0 = new TypeMatcher(String.class); assertFalse(matcher0.equals(new Object())); }