### Question:
ClusterManagerUpgradeService { public void upgradeClusterManager(Long stackId) throws CloudbreakOrchestratorException, CloudbreakException { Stack stack = stackService.getByIdWithListsInTransaction(stackId); stopClusterServices(stack); upgradeClusterManager(stack); }  void removeUnusedComponents(Long stackId); void upgradeClusterManager(Long stackId);  }### Answer:
@Test public void testUpgradeClusterManager() throws CloudbreakOrchestratorException, CloudbreakException { Cluster cluster = stack.getCluster(); underTest.upgradeClusterManager(STACK_ID); verify(gatewayConfigService, times(1)).getGatewayConfig(stack, stack.getPrimaryGatewayInstance(), cluster.getGateway() != null); verify(clusterComponentConfigProvider, times(1)).getClouderaManagerRepoDetails(cluster.getId()); verify(hostOrchestrator, times(1)).upgradeClusterManager(any(), any(), any(), any(), any()); verify(clusterApi).stopCluster(true); verify(clusterHostServiceRunner, times(1)).decoratePillarWithClouderaManagerSettings(any(), any()); }