### Question:
MicroVisitor { public static void visit (@Nonnull final IMicroNode aNode, @Nonnull final IHierarchyVisitorCallback <? super IMicroNode> aCallback) { ValueEnforcer.notNull (aNode, "Node"); ChildrenProviderHierarchyVisitor.visitFrom (aNode, aCallback, false); } private  MicroVisitor(); static void visit(@Nonnull final IMicroNode aNode, @Nonnull final IHierarchyVisitorCallback <? super IMicroNode> aCallback); static void visit(@Nonnull final T aNode,
                                                   @Nonnull final IChildrenProvider <T> aChildrenProvider,
                                                   @Nonnull final IHierarchyVisitorCallback <? super T> aCallback);  }### Answer:
@Test public void testVisitStatic () { final IMicroDocument doc = MicroReader.readMicroXML (new ClassPathResource ("xml/xml-processing-instruction.xml")); assertNotNull (doc); final MutableInt aInt = new MutableInt (0); MicroVisitor.visit (doc, new DefaultHierarchyVisitorCallback <IMicroNode> () { @Override @Nonnull public EHierarchyVisitorReturn onItemBeforeChildren (final IMicroNode aItem) { if (aItem.isProcessingInstruction ()) aInt.inc (); return EHierarchyVisitorReturn.CONTINUE; } }); assertEquals (3, aInt.intValue ()); aInt.set (0); MicroVisitor.visit (doc.getDocumentElement (), new DefaultHierarchyVisitorCallback <IMicroNode> () { @Override @Nonnull public EHierarchyVisitorReturn onItemBeforeChildren (@Nonnull final IMicroNode aItem) { if (aItem.isProcessingInstruction ()) aInt.inc (); return EHierarchyVisitorReturn.CONTINUE; } }); assertEquals (1, aInt.intValue ()); try { MicroVisitor.visit (null, new DefaultHierarchyVisitorCallback <IMicroNode> ()); fail (); } catch (final NullPointerException ex) {} try { MicroVisitor.visit (doc, (IHierarchyVisitorCallback <IMicroNode>) null); fail (); } catch (final NullPointerException ex) {} }