@Test public void checkServiceResolver_failMigrationService() throws LoginException { when(resolverService.getContentMigratorResourceResolver()).thenReturn(null); Result result = check.execute(); assertEquals(Result.Status.CRITICAL, result.getStatus()); }
@Override public Result execute() { final FormattingResultLog resultLog = new FormattingResultLog(); checkServiceResolver(resultLog); if (resultLog.getAggregateStatus().equals(Status.CRITICAL)) { return new Result(resultLog); } checkHistoryNodeAccess(resultLog); checkHookHistoryNodeAccess(resultLog); return new Result(resultLog); }
SelfCheckHealthCheck implements HealthCheck { @Override public Result execute() { final FormattingResultLog resultLog = new FormattingResultLog(); checkServiceResolver(resultLog); if (resultLog.getAggregateStatus().equals(Status.CRITICAL)) { return new Result(resultLog); } checkHistoryNodeAccess(resultLog); checkHookHistoryNodeAccess(resultLog); return new Result(resultLog); } }
SelfCheckHealthCheck implements HealthCheck { @Override public Result execute() { final FormattingResultLog resultLog = new FormattingResultLog(); checkServiceResolver(resultLog); if (resultLog.getAggregateStatus().equals(Status.CRITICAL)) { return new Result(resultLog); } checkHistoryNodeAccess(resultLog); checkHookHistoryNodeAccess(resultLog); return new Result(resultLog); }  }
SelfCheckHealthCheck implements HealthCheck { @Override public Result execute() { final FormattingResultLog resultLog = new FormattingResultLog(); checkServiceResolver(resultLog); if (resultLog.getAggregateStatus().equals(Status.CRITICAL)) { return new Result(resultLog); } checkHistoryNodeAccess(resultLog); checkHookHistoryNodeAccess(resultLog); return new Result(resultLog); }  @Override Result execute(); }
SelfCheckHealthCheck implements HealthCheck { @Override public Result execute() { final FormattingResultLog resultLog = new FormattingResultLog(); checkServiceResolver(resultLog); if (resultLog.getAggregateStatus().equals(Status.CRITICAL)) { return new Result(resultLog); } checkHistoryNodeAccess(resultLog); checkHookHistoryNodeAccess(resultLog); return new Result(resultLog); }  @Override Result execute();  }