@Test
  public void testPreUpgradeCheckNotApplicable() throws Exception {
    final Cluster cluster = Mockito.mock(Cluster.class);

    m_services.add("KAFKA");

    Mockito.when(clusters.getCluster("cluster")).thenReturn(cluster);

    final CheckHelper helper = new CheckHelper();
    helper.clustersProvider = () -> clusters;
    helper.repositoryVersionDaoProvider = () -> repositoryVersionDao;

    Configuration configuration = EasyMock.createNiceMock(Configuration.class);
    List<UpgradeCheck> updateChecksRegistry = new ArrayList<>();

    EasyMock.expect(configuration.isUpgradePrecheckBypass()).andReturn(false);
    EasyMock.replay(configuration);
    updateChecksRegistry.add(m_mockCheck);

    ClusterInformation clusterInformation = new ClusterInformation("cluster", false, null, null, null);
    UpgradeCheckRequest request = new UpgradeCheckRequest(clusterInformation,
        UpgradeType.NON_ROLLING, m_repositoryVersion, null, null);

    helper.performChecks(request, updateChecksRegistry, configuration);

    Assert.assertEquals(null, request.getResult(m_mockUpgradeCheckDescription));

    request = new UpgradeCheckRequest(clusterInformation, UpgradeType.ROLLING, m_repositoryVersion, null, null);
  }
Checks can be ignored, even if they are expected to fail.
ambari-server/src/test/java/org/apache/ambari/server/state/CheckHelperTest.java