AbstractDataServiceVisitor implements ElementVisitor<String, Writer> ,ProcessorConstants { Types getTypeUtils() { return environment.getTypeUtils(); } 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_getTypeUtils() { System.out.println("getTypeUtils"); Types types = mock(Types.class); when(environment.getTypeUtils()).thenReturn(types); Types result = instance.getTypeUtils(); assertThat(result).isEqualTo(types); }