@Test public void testStopTelemetryAgent() throws Exception { given(stackRepository.findById(1L)).willReturn(Optional.of(createStack())); given(instanceMetaDataRepository.findNotTerminatedForStack(1L)).willReturn(createInstanceMetadataSet()); doNothing().when(telemetryOrchestrator).stopTelemetryAgent(anyList(), anySet(), any(ExitCriteriaModel.class)); underTest.stopTelemetryAgent(1L); verify(telemetryOrchestrator, times(1)).stopTelemetryAgent(anyList(), anySet(), any(ExitCriteriaModel.class)); }
public void stopTelemetryAgent(Long stackId) { stopTelemetryAgent(stackId, null); }
TelemetryAgentService { public void stopTelemetryAgent(Long stackId) { stopTelemetryAgent(stackId, null); } }
TelemetryAgentService { public void stopTelemetryAgent(Long stackId) { stopTelemetryAgent(stackId, null); } TelemetryAgentService(TelemetryOrchestrator telemetryOrchestrator, GatewayConfigService gatewayConfigService,
            StackRepository stackRepository, InstanceMetaDataRepository instanceMetaDataRepository); }
TelemetryAgentService { public void stopTelemetryAgent(Long stackId) { stopTelemetryAgent(stackId, null); } TelemetryAgentService(TelemetryOrchestrator telemetryOrchestrator, GatewayConfigService gatewayConfigService,
            StackRepository stackRepository, InstanceMetaDataRepository instanceMetaDataRepository); void stopTelemetryAgent(Long stackId); void stopTelemetryAgent(Long stackId, List<String> instanceIds); }
TelemetryAgentService { public void stopTelemetryAgent(Long stackId) { stopTelemetryAgent(stackId, null); } TelemetryAgentService(TelemetryOrchestrator telemetryOrchestrator, GatewayConfigService gatewayConfigService,
            StackRepository stackRepository, InstanceMetaDataRepository instanceMetaDataRepository); void stopTelemetryAgent(Long stackId); void stopTelemetryAgent(Long stackId, List<String> instanceIds);  }