Stats { public String result() { if (errorCode == null) return "OK"; return "WARN"; }  String result(); void put(String key, double value); boolean checkHighUsage(double usage, double threshold, String name); void info(String key, String value); final Map<String, Double> stats; public String errorCode; public String errorMessage; public Map<String, String> info; }
@Test void result() { assertThat(stats.result()).isEqualTo("OK"); stats.errorCode = "HIGH_CPU_USAGE"; assertThat(stats.result()).isEqualTo("WARN"); }