### Question:
ClouderaManagerClusterDecomissionService implements ClusterDecomissionService { @Override public Set<String> decommissionClusterNodes(Map<String, InstanceMetaData> hostsToRemove) { return clouderaManagerDecomissioner.decommissionNodes(stack, hostsToRemove, client); } ClouderaManagerClusterDecomissionService(Stack stack, HttpClientConfig clientConfig); @PostConstruct void initApiClient(); @Override void verifyNodesAreRemovable(Stack stack, Collection<InstanceMetaData> removableInstances); @Override Set<InstanceMetaData> collectDownscaleCandidates(@Nonnull HostGroup hostGroup, Integer scalingAdjustment, int defaultRootVolumeSize,
            Set<InstanceMetaData> instanceMetaDatasInStack); @Override Map<String, InstanceMetaData> collectHostsToRemove(@Nonnull HostGroup hostGroup, Set<String> hostNames); @Override Set<String> decommissionClusterNodes(Map<String, InstanceMetaData> hostsToRemove); @Override void removeManagementServices(); @Override void deleteHostFromCluster(InstanceMetaData data); @Override void deleteUnusedCredentialsFromCluster(); @Override void restartStaleServices(); @Override Map<String, Map<String, String>> getStatusOfComponentsForHost(String host);  }### Answer:
@Test public void testDecommissionClusterNodes() { Map<String, InstanceMetaData> hostsToRemove = new HashMap<>(); Set<String> hosts = Set.of("host"); when(clouderaManagerDecomissioner.decommissionNodes(stack, hostsToRemove, apiClient)).thenReturn(hosts); Set<String> actual = underTest.decommissionClusterNodes(hostsToRemove); assertEquals(hosts, actual); verify(clouderaManagerDecomissioner).decommissionNodes(stack, hostsToRemove, apiClient); }