TinylogContextProvider implements ContextProvider { @Override public void clear() { data.set(Collections.<String, String>emptyMap()); } TinylogContextProvider(); @Override Map<String, String> getMapping(); @Override String get(final String key); @Override void put(final String key, final Object value); @Override void remove(final String key); @Override void clear();  }
@Test public void clear() { TinylogContextProvider provider = new TinylogContextProvider(); provider.put("a", 1); provider.put("b", 2); assertThat(provider.getMapping()).containsOnly(entry("a", "1"), entry("b", "2")); provider.clear(); assertThat(provider.getMapping()).isEmpty(); }