### Question:
AwsSessionService { public AWSSimpleSystemsManagement getSsmSession(AWSEnvironment environment) { return awsSessionFactory.createSsmSession(credentialCache.getUnchecked(environment), environment.getRegion()); } @Autowired  AwsSessionService(AccountInformationService accountInformationService,
                                               AWSSecurityTokenServiceClient awsSecurityTokenServiceClient,
                                               AwsSessionFactory awsSessionFactory,
                                               GatekeeperAwsProperties gatekeeperAwsProperties); AmazonEC2 getEC2Session(AWSEnvironment environment); AWSSimpleSystemsManagement getSsmSession(AWSEnvironment environment); AmazonSNS getSnsSession();  }### Answer:
@Test public void testGetSsmSession(){ AWSSimpleSystemsManagement client = awsSessionService.getSsmSession(awsEnvironment); Assert.assertNotNull("Verify Ssm Session is fetched", client); Mockito.verify(awsSessionFactory, times(1)).createSsmSession(anyObject(), eq(awsEnvironment.getRegion())); }