### Question:
IndexingElementVisitor implements ElementVisitor { @Override public void visit(SessionContext context, ElementContext elementContext, Space space, CoreElement element) { elementCommandFactory.executeCommand(context, elementContext, space, element); } private  IndexingElementVisitor(); static IndexingElementVisitor init(); @Override void visit(SessionContext context, ElementContext elementContext, Space space,
                    CoreElement element);  }### Answer:
@Test public void testVisit() throws Exception { SessionContext context = TestUtils.createSessionContext(USER, "test"); ElementContext elementContext = new ElementContext(new Id(), new Id()); Space space = Space.PRIVATE; CoreElement element = new CoreElement(); visitor.visit(context, elementContext, space, element); verify(elementCommandFactoryMock).executeCommand(context, elementContext, space, element); }