App extends Module { void logContext(ActionLog actionLog) { actionLog.action("app:start"); Runtime runtime = Runtime.getRuntime(); actionLog.stats.put("cpu", (double) runtime.availableProcessors()); actionLog.stats.put("max_memory", (double) runtime.maxMemory()); }  final void start(); final void configure();  }
@Test void logContext() { ActionLog actionLog = new ActionLog(null, null); app.logContext(actionLog); assertThat(actionLog.action).isEqualTo("app:start"); assertThat(actionLog.stats).containsKeys("cpu", "max_memory"); }