@Test
public void mustFormatMessage() {
final ActorSystem system = ActorSystem.create("test-system", config);
final LoggingAdapter log = Logging.getLogger(system, this);
new LogJavaTestKit(system) {{
system.eventStream().subscribe(getRef(), LogEvent.class);
log.error("One arg message: {}", "the arg");
expectLog(ErrorLevel(), "One arg message: the arg");
Throwable cause = new IllegalStateException("This state is illegal");
log.error(cause, "Two args message: {}, {}", "an arg", "another arg");