Logger { public void clear() { location = null; error = false; } Logger(Messager messager); void error(Object value, String reason, String resolution); void error(Object value, String reason); void error(String message); void warn(Object value, String reason, String resolution); void warn(Object value, String reason); void warn(String message); void note(Object value, String reason, String resolution); void note(Object value, String reason); void note(String message); Logger zone(@Nullable Element location); void clear(); boolean error();  }
@Test void clear() { logger.error("first"); assertTrue(logger.error()); logger.clear(); logger.warn("second"); assertFalse(logger.error()); verify(messager).printMessage(WARNING, "second"); }