StandaloneEnvironment extends Environment<Element> { @Override public void error(String message) { messager.printMessage(ERROR, message); } StandaloneEnvironment(Messager messager); @Override void error(String message); @Override void error(Element location, String message); @Override void warn(String message); @Override void warn(Element location, String message);  }
@Test void error() { environment.error("error"); verify(messager).printMessage(ERROR, "error"); }
@Test void error_element() { environment.error(element, "error"); verify(messager).printMessage(ERROR, "error", element); }