factory.removeClassVisitor(extension);
}
@SuppressWarnings("unchecked")
public void testWalk() throws Exception {
JavaImplementationFactory factory = new DefaultJavaImplementationFactory();
JavaClassVisitor extension = EasyMock.createMock(JavaClassVisitor.class);
extension.visitClass(EasyMock.eq(Bar.class), EasyMock.isA(JavaImplementation.class));
extension.visitConstructor(EasyMock.isA(Constructor.class), EasyMock.isA(JavaImplementation.class));
extension.visitMethod(EasyMock.isA(Method.class), EasyMock.isA(JavaImplementation.class));
extension.visitField(EasyMock.isA(Field.class), EasyMock.isA(JavaImplementation.class));
extension.visitSuperClass(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));
extension.visitEnd(EasyMock.isA(Class.class), EasyMock.isA(JavaImplementation.class));
// mock.expects(once()).method("visitClass");
// mock.expects(once()).method("visitMethod");
// mock.expects(once()).method("visitField");
// mock.expects(once()).method("visitConstructor");
// mock.expects(once()).method("visitSuperClass");
// mock.expects(once()).method("visitEnd");
EasyMock.replay(extension);
factory.addClassVisitor(extension);
factory.createJavaImplementation(Bar.class);
EasyMock.verify(extension);
}