StandaloneEnvironment extends Environment<Element> { @Override public void warn(String message) { messager.printMessage(WARNING, 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 warn() { environment.warn("warning"); verify(messager).printMessage(WARNING, "warning"); }
@Test void warning() { environment.warn(element, "warning"); verify(messager).printMessage(WARNING, "warning", element); }