### Question:
MessagerLogger implements Logger { @Override public void error(@Nonnull String message, @Nullable Object... args) { print(Diagnostic.Kind.ERROR, message, args); } @Inject @SuppressWarnings("unused")  MessagerLogger(@Nonnull Messager messager); @VisibleForTesting  MessagerLogger(@Nonnull Messager messager, @Nonnull Locale locale); @Override void warning(@Nonnull String message, @Nullable Object... args); @Override void error(@Nonnull String message, @Nullable Object... args);  }### Answer:
@Test public void errorShouldPrintMessageWithWarning() { underTest.error("This is %s message", "error"); verify(messager) .printMessage(eq(Diagnostic.Kind.ERROR), eq("This is error message")); }