@Test
void execute() throws IOException {

    when(elasticSearchClient.stats("localhost"))
            .thenReturn(JSON.fromJSON(ElasticSearchNodeStats.class, ClasspathResources.text("es-job-test/stats.json")));
    job.execute(null);
    verify(publisher).publish(argThat(message -> "es-0".equals(message.host)));
}