### Question:
TypeMatcher implements Predicate<OpenNode<? extends Object, ?>> { @Override public boolean test(OpenNode<? extends Object, ?> node) { return type.equals(node.getElementClass()); } TypeMatcher(Class<?> type); @Override boolean test(OpenNode<? extends Object, ?> node); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testMatches() { final OpenNode<String, Node<String>> node = new ImmutableNode<String, Node<String>>("a", new Object[0]) {}; final TypeMatcher matcher = new TypeMatcher(String.class); assertTrue(matcher.test(node)); }
@Test public void testNotMatches() { final OpenNode<String, Node<String>> node = new ImmutableNode<String, Node<String>>("a", new Object[0]) {}; final TypeMatcher matcher = new TypeMatcher(Integer.class); assertFalse(matcher.test(node)); }