NoopLogger implements JsonLogger { @Override public JsonLogger json(String key, JsonElement jsonElement) { return this; }  @Override JsonLogger map(String key, Map map); @Override JsonLogger map(String key, Supplier<Map> map); @Override JsonLogger list(String key, List list); @Override JsonLogger list(String key, Supplier<List> list); @Override JsonLogger message(String message); @Override JsonLogger message(Supplier<String> message); @Override JsonLogger field(String key, Object value); @Override JsonLogger field(String key, Supplier value); @Override JsonLogger json(String key, JsonElement jsonElement); @Override JsonLogger json(String key, Supplier<JsonElement> jsonElement); @Override JsonLogger exception(String key, Exception exception); @Override JsonLogger stack(); @Override JsonLogger marker(Marker marker); @Override void log();  }
@Test public void testJson() { JsonLogger result = this.logger.json("x-field-key-x", new JsonObject()); assertSame(result, this.logger); }
@Test public void testJsonSupplier() { JsonLogger result = this.logger.json("x-field-key-x", () -> { throw new RuntimeException("unexpected execution"); }); assertSame(result, this.logger); }