@Test public void testExecute() { HealthCheck healthCheck = new SmokeHealthCheck(); Result result = healthCheck.execute(); assertEquals("Status should be OK", Result.Status.OK, result.getStatus()); assertEquals("Result should be ok", true, result.isOk()); assertTrue("Message should say instance is ready", result.iterator().next().getMessage().contains("Instance is ready at")); }
@Override public Result execute() { FormattingResultLog resultLog = new FormattingResultLog(); resultLog.info("Instance is ready at {}", new Date()); return new Result(resultLog); }
SmokeHealthCheck implements HealthCheck { @Override public Result execute() { FormattingResultLog resultLog = new FormattingResultLog(); resultLog.info("Instance is ready at {}", new Date()); return new Result(resultLog); } }
SmokeHealthCheck implements HealthCheck { @Override public Result execute() { FormattingResultLog resultLog = new FormattingResultLog(); resultLog.info("Instance is ready at {}", new Date()); return new Result(resultLog); }  }
SmokeHealthCheck implements HealthCheck { @Override public Result execute() { FormattingResultLog resultLog = new FormattingResultLog(); resultLog.info("Instance is ready at {}", new Date()); return new Result(resultLog); }  @Override Result execute(); }
SmokeHealthCheck implements HealthCheck { @Override public Result execute() { FormattingResultLog resultLog = new FormattingResultLog(); resultLog.info("Instance is ready at {}", new Date()); return new Result(resultLog); }  @Override Result execute();  }