### Question:
AwsMockAccountMappingService { public Map<String, String> getGroupMappings(String region, Credential credential, String adminGroupName) { String accountId = getAccountId(region, credential); if (StringUtils.isNotEmpty(adminGroupName)) { return replaceAccountId(getGroupMappings(adminGroupName), accountId); } else { throw new CloudbreakServiceException(String.format("Failed to get group mappings because of missing adminGroupName for accountId: %s", accountId)); } } AwsMockAccountMappingService(CloudPlatformConnectors cloudPlatformConnectors, CredentialToCloudCredentialConverter credentialConverter); Map<String, String> getGroupMappings(String region, Credential credential, String adminGroupName); Map<String, String> getUserMappings(String region, Credential credential);  }### Answer:
@Test void testGetGroupMappingsWhenSuccess() { Map<String, String> groupMappings = underTest.getGroupMappings(REGION, credential, ADMIN_GROUP_NAME); assertThat(groupMappings).isNotNull(); assertThat(groupMappings).containsOnly(Map.entry(ADMIN_GROUP_NAME, IAM_ROLE)); }
@Test void testGetGroupMappingsWhenAdminGroupIsMissing() { assertThrows(CloudbreakServiceException.class, () -> underTest.getGroupMappings(REGION, credential, null)); }