@Test public void constructor_shouldCreateAnUnmodifiableMap() throws Exception { Map<String, String> expectedContext = new LinkedHashMap<>(); expectedContext.put("foo", "bar"); Map<String, String> actualContext = new DiagnosticContext(() -> expectedContext).getContext(); ensureUnmodifiableMap(actualContext); }
public Map<String, String> getContext() { return context; }
DiagnosticContext { public Map<String, String> getContext() { return context; } }
DiagnosticContext { public Map<String, String> getContext() { return context; } DiagnosticContext(DiagnosticContextSupplier supplier); }
DiagnosticContext { public Map<String, String> getContext() { return context; } DiagnosticContext(DiagnosticContextSupplier supplier); Map<String, String> getContext(); void printContextInformation(StringBuilder result); }
DiagnosticContext { public Map<String, String> getContext() { return context; } DiagnosticContext(DiagnosticContextSupplier supplier); Map<String, String> getContext(); void printContextInformation(StringBuilder result);  }