### Question:
StraceDiagnosticManager { public void enableMicroserviceStraceDiagnostics(String microserviceUuid) { LoggingService.logInfo(MODULE_NAME, "Start enable microservice for strace diagnostics : " + microserviceUuid); try { int pid = getPidByContainerName(DockerUtil.getIoFogContainerName(microserviceUuid)); MicroserviceStraceData newMicroserviceStraceData = new MicroserviceStraceData(microserviceUuid, pid, true); this.monitoringMicroservices.removeIf( oldMicroserviceStraceData -> oldMicroserviceStraceData.getMicroserviceUuid().equals(microserviceUuid) ); this.monitoringMicroservices.add(newMicroserviceStraceData); runStrace(newMicroserviceStraceData); } catch (IllegalArgumentException e) { logError(MODULE_NAME, "Can't get pid of process", new AgentSystemException("Can't get pid of process", e)); } LoggingService.logInfo(MODULE_NAME, "Finished enable microservice for strace diagnostics : " + microserviceUuid); } private  StraceDiagnosticManager(); static StraceDiagnosticManager getInstance(); List<MicroserviceStraceData> getMonitoringMicroservices(); void updateMonitoringMicroservices(JsonObject diagnosticData); void enableMicroserviceStraceDiagnostics(String microserviceUuid); void disableMicroserviceStraceDiagnostics(String microserviceUuid);  }### Answer:
@Test public void testEnableMicroserviceStraceDiagnosticsWithValidMicroserviceUuid() { error = new ArrayList<>(); value = new ArrayList<>(); value.add("pid 1234"); value.add("pid 2345"); resultSetWithPath = new CommandShellResultSet<>(value, error); when(CommandShellExecutor.executeCommand(any())).thenReturn(resultSetWithPath); straceDiagnosticManager.enableMicroserviceStraceDiagnostics(microserviceUuid); PowerMockito.verifyStatic(LoggingService.class, Mockito.times(1)); LoggingService.logInfo(MODULE_NAME, "Start enable microservice for strace diagnostics : microserviceUuid"); LoggingService.logInfo(MODULE_NAME, "Start getting pid of microservice by container name : microserviceUuid"); LoggingService.logInfo(MODULE_NAME, "Finished enable microservice for strace diagnostics : microserviceUuid"); }
@Test public void testEnableMicroserviceStraceDiagnosticsWithInvalidMicroserviceUuid() { error = new ArrayList<>(); value = new ArrayList<>(); error.add("error"); resultSetWithPath = new CommandShellResultSet<>(value, error); when(CommandShellExecutor.executeCommand(any())).thenReturn(resultSetWithPath); straceDiagnosticManager.enableMicroserviceStraceDiagnostics(null); PowerMockito.verifyStatic(LoggingService.class, Mockito.times(1)); LoggingService.logInfo(MODULE_NAME, "Start enable microservice for strace diagnostics : null"); LoggingService.logInfo(MODULE_NAME, "Start getting pid of microservice by container name : null"); LoggingService.logInfo(MODULE_NAME, "Finished enable microservice for strace diagnostics : null"); LoggingService.logError(any(), any(), any()); }