@Test
  public void testAddComponentWhereServiceIsNotInstalled() throws Exception {
    expect(m_mockCluster.getService(NEW_SERVICE)).andThrow(
        new ServiceNotFoundException(CLUSTER_NAME, CANDIDATE_SERVICE)).once();

    PowerMock.replay(m_action);
    replayAll();

    m_action.execute(null);

    verifyAll();
  }
Tests that we fail when the candidateg service isn't installed in the
cluster.

@throws Exception
ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/AddComponentActionTest.java