OcelotProcessor extends AbstractProcessor { public void processElement(Element element) { if (TypeElement.class.isInstance(element)) { writeGeneratedJsInDiferentTargets((TypeElement) element); } }  @Override void init(ProcessingEnvironment processingEnv); @Override boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv); void processElement(Element element);  }
@Test public void processElementTest() { System.out.println("processElement"); doNothing().when(instance).writeGeneratedJsInDiferentTargets(any(TypeElement.class)); instance.processElement(mock(Element.class)); instance.processElement(mock(TypeElement.class)); verify(instance).writeGeneratedJsInDiferentTargets(any(TypeElement.class)); }