AbstractDataServiceVisitor implements ElementVisitor<String, Writer> ,ProcessorConstants { Elements getElementUtils() { return environment.getElementUtils(); } AbstractDataServiceVisitor(ProcessingEnvironment environment); @Override String visitType(TypeElement typeElement, Writer writer); @Override String visit(Element e, Writer p); @Override String visit(Element e); @Override String visitPackage(PackageElement e, Writer p); @Override String visitVariable(VariableElement e, Writer p); @Override String visitExecutable(ExecutableElement e, Writer p); @Override String visitTypeParameter(TypeParameterElement e, Writer p); @Override String visitUnknown(Element e, Writer p);  }
@Test public void test_getElementUtils() { System.out.println("getElementUtils"); Elements elements = mock(Elements.class); when(environment.getElementUtils()).thenReturn(elements); Elements result = instance.getElementUtils(); assertThat(result).isEqualTo(elements); }