### Question:
AzureCredentialAppCreationCommand { String getRedirectURL(String workspaceId, String deploymentAddress) { String cbAzAppAuthUri = String.format(CB_AZ_APP_REDIRECT_URI_PATTERN, workspaceId); String replyUrl = deploymentAddress.endsWith(DELIMITER) ? deploymentAddress : deploymentAddress + DELIMITER; return replyUrl + cbAzAppAuthUri; }  String generate(String deploymentAddress); AzureApplicationCreationView generateJSON(String deploymentAddress);  }### Answer:
@Test public void testGetRedirectURLWhenDeploymentAddressDoesNotEndsWithExpectedDelimiterThenItShouldHaveInsertedBetweenDeploymentAddressAndAuthUri() { String deploymentAddressWithoutDelimiterAtEnd = "https: String expected = format("%s/%s", deploymentAddressWithoutDelimiterAtEnd, format(CB_AZ_APP_REDIRECT_URI_PATTERN, WORKSPACE_ID)); String result = underTest.getRedirectURL(WORKSPACE_ID, deploymentAddressWithoutDelimiterAtEnd); Assert.assertEquals(expected, result); }
@Test public void testGetRedirectURLWhenDeploymentAddressEndsWithExpectedDelimiterThenDeploymentAddressAndAuthUriShouldComeBackConcatenatedAfterEachOther() { String deploymentAddressWithDelimiterAtEnd = "https: String expected = format("%s%s", deploymentAddressWithDelimiterAtEnd, format(CB_AZ_APP_REDIRECT_URI_PATTERN, WORKSPACE_ID)); String result = underTest.getRedirectURL(WORKSPACE_ID, deploymentAddressWithDelimiterAtEnd); Assert.assertEquals(expected, result); }