### Question:
SsmService { public Map<String, String> deleteUserAccount(AWSEnvironment environment, List<String> instanceIds, String userName, String platform) { logger.info("Deleting user account: " + userName + " on instances: " + instanceIds + " on environment: " + environment); GatekeeperSsmProperties.SsmDocument documentProperties = getSsmDocument(platform, "delete"); ArrayList<String> userNameList = new ArrayList<>(); userNameList.add(userName); Map<String, ArrayList<String>> parameters = new HashMap<>(); parameters.put("userName", userNameList); return executeSsm(environment, instanceIds, platform, parameters, documentProperties); } @Autowired  SsmService(AwsSessionService awsSessionService,
                      GatekeeperSsmProperties gatekeeperSsmProperties,
                      GatekeeperEmailProperties gatekeeperEmailProperties); Map<String, String> checkInstancesWithSsm(AWSEnvironment environment, List<String> instanceIds); Map<String, String> createUserAccount(AWSEnvironment environment, List<String> instanceIds, String userName, String publicKey, String platform, String hours); Map<String, String> createUserAccount(AWSEnvironment environment, List<String> instanceIds, User user, AccessRequest accessRequest, String platform); Map<String, String> deleteUserAccount(AWSEnvironment environment, List<String> instanceIds, String userName, String platform);  }### Answer:
@Test public void testDeleteUserAccount(){ Map<String, String> results = ssmService.deleteUserAccount(awsEnvironment, Arrays.asList("i-1","i-2"), "theUser", "Linux"); Assert.assertTrue("Verify that the ssm succeeds for Linux", results.containsValue("Success")); SendCommandRequest scr = new SendCommandRequest() .withInstanceIds( Arrays.asList("i-1","i-2")) .withDocumentName("test-linux-delete") .addParametersEntry("userName",Arrays.asList("theUser")); verify(awsSimpleSystemsManagementClient, times(1)).sendCommand(scr); results = ssmService.deleteUserAccount(awsEnvironment, Arrays.asList("i-3","i-4"), "theWindowsUser", "Windows"); Assert.assertTrue("Verify that the ssm succeeds for Windows", results.containsValue("Success")); scr = new SendCommandRequest() .withInstanceIds( Arrays.asList("i-3","i-4")) .withDocumentName("test-windows-delete") .addParametersEntry("userName",Arrays.asList("theWindowsUser")); verify(awsSimpleSystemsManagementClient, times(1)).sendCommand(scr); }