@Test void testGetGroupMappingsWhenSuccess() { Map<String, String> groupMappings = underTest.getGroupMappings(RESOURCE_GROUP, credential, ADMIN_GROUP_NAME); assertThat(groupMappings).isNotNull(); assertThat(groupMappings).containsOnly(Map.entry(ADMIN_GROUP_NAME, MANAGED_IDENTITY)); }
public Map<String, String> getGroupMappings(String resourceGroup, Credential credential, String adminGroupName) { String subscriptionId = credential.getAzure().getSubscriptionId(); if (StringUtils.isNotEmpty(adminGroupName)) { return replacePlaceholders(getGroupMappings(adminGroupName), resourceGroup, subscriptionId); } else { throw new CloudbreakServiceException("Failed to get group mappings because of missing adminGroupName"); } }
AzureMockAccountMappingService { public Map<String, String> getGroupMappings(String resourceGroup, Credential credential, String adminGroupName) { String subscriptionId = credential.getAzure().getSubscriptionId(); if (StringUtils.isNotEmpty(adminGroupName)) { return replacePlaceholders(getGroupMappings(adminGroupName), resourceGroup, subscriptionId); } else { throw new CloudbreakServiceException("Failed to get group mappings because of missing adminGroupName"); } } }
AzureMockAccountMappingService { public Map<String, String> getGroupMappings(String resourceGroup, Credential credential, String adminGroupName) { String subscriptionId = credential.getAzure().getSubscriptionId(); if (StringUtils.isNotEmpty(adminGroupName)) { return replacePlaceholders(getGroupMappings(adminGroupName), resourceGroup, subscriptionId); } else { throw new CloudbreakServiceException("Failed to get group mappings because of missing adminGroupName"); } }  }
AzureMockAccountMappingService { public Map<String, String> getGroupMappings(String resourceGroup, Credential credential, String adminGroupName) { String subscriptionId = credential.getAzure().getSubscriptionId(); if (StringUtils.isNotEmpty(adminGroupName)) { return replacePlaceholders(getGroupMappings(adminGroupName), resourceGroup, subscriptionId); } else { throw new CloudbreakServiceException("Failed to get group mappings because of missing adminGroupName"); } }  Map<String, String> getGroupMappings(String resourceGroup, Credential credential, String adminGroupName); Map<String, String> getUserMappings(String resourceGroup, Credential credential); }
AzureMockAccountMappingService { public Map<String, String> getGroupMappings(String resourceGroup, Credential credential, String adminGroupName) { String subscriptionId = credential.getAzure().getSubscriptionId(); if (StringUtils.isNotEmpty(adminGroupName)) { return replacePlaceholders(getGroupMappings(adminGroupName), resourceGroup, subscriptionId); } else { throw new CloudbreakServiceException("Failed to get group mappings because of missing adminGroupName"); } }  Map<String, String> getGroupMappings(String resourceGroup, Credential credential, String adminGroupName); Map<String, String> getUserMappings(String resourceGroup, Credential credential); static final String MSI_RESOURCE_GROUP_NAME; }