### Question:
WisdomModelVisitor extends AnnotationVisitor { @Override public void visitEnd() { if (name == null || name.length() == 0) { reporter.error("The 'name' attribute of @Model from " + workbench.getType().getClassName() + " must be " + "set"); return; } if (! Type.getDescriptor(Crud.class).equals(node.desc)) { reporter.warn("The type of the field " + field + " from " + workbench.getType().getClassName() + " should" + " be " + Crud.class.getName() + " because the field is annotated with @Model"); } Element requires = new Element("requires", ""); requires.addAttribute(new Attribute("field", field)); requires.addAttribute(new Attribute("filter", getFilter(name))); workbench.getElements().put(requires, null); } WisdomModelVisitor(ComponentWorkbench workbench, Reporter reporter, FieldNode node); @Override void visit(String s, Object o); @Override void visitEnd();  }### Answer:
@Test public void parseEmptyAnnotation() { Reporter reporter = new SystemReporter(); ComponentWorkbench workbench = mock(ComponentWorkbench.class); when(workbench.getType()).thenReturn(Type.getType(MyComponent.class)); when(workbench.getClassNode()).thenReturn(new ClassNode()); when(workbench.getElements()).thenReturn(elements); FieldNode node = new FieldNode(Opcodes.ACC_PROTECTED, "model", Type.getDescriptor(Crud.class), null, null); WisdomModelVisitor visitor = new WisdomModelVisitor(workbench, reporter, node); visitor.visitEnd(); assertThat(elements).hasSize(0); }