diff --git a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
index c3489986b22e1..6ad585a1a82f9 100644
--- a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
+++ b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.1.0-beta.5 (Unreleased)
+## 1.0.0-beta.1 (2023-03-27)
+
+- Azure Resource Manager Communication client library for Java. This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/communication/azure-resourcemanager-communication/README.md b/sdk/communication/azure-resourcemanager-communication/README.md
index bc6adc4e0139f..cbc1209fd3024 100644
--- a/sdk/communication/azure-resourcemanager-communication/README.md
+++ b/sdk/communication/azure-resourcemanager-communication/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Communication client library for Java.
-This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-preview-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-communication
- 1.1.0-beta.4
+ 1.1.0-beta.5
```
[//]: # ({x-version-update-end})
diff --git a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
index 283d0a7dcd6be..bd3b4e56097e3 100644
--- a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
+++ b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
@@ -52,7 +52,7 @@ import com.azure.resourcemanager.communication.models.NameAvailabilityParameters
/** Samples for CommunicationServices CheckNameAvailability. */
public final class CommunicationServicesCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityAvailable.json
*/
/**
* Sample code: Check name availability available.
@@ -71,7 +71,7 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
}
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityUnavailable.json
*/
/**
* Sample code: Check name availability unavailable.
@@ -97,7 +97,7 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
/** Samples for CommunicationServices CreateOrUpdate. */
public final class CommunicationServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/createOrUpdate.json
*/
/**
* Sample code: Create or update resource.
@@ -122,7 +122,7 @@ public final class CommunicationServicesCreateOrUpdateSamples {
/** Samples for CommunicationServices Delete. */
public final class CommunicationServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/delete.json
*/
/**
* Sample code: Delete resource.
@@ -143,7 +143,7 @@ public final class CommunicationServicesDeleteSamples {
/** Samples for CommunicationServices GetByResourceGroup. */
public final class CommunicationServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/get.json
*/
/**
* Sample code: Get resource.
@@ -167,7 +167,7 @@ import com.azure.resourcemanager.communication.models.LinkNotificationHubParamet
/** Samples for CommunicationServices LinkNotificationHub. */
public final class CommunicationServicesLinkNotificationHubSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/linkNotificationHub.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/linkNotificationHub.json
*/
/**
* Sample code: Link notification hub.
@@ -195,7 +195,7 @@ public final class CommunicationServicesLinkNotificationHubSamples {
/** Samples for CommunicationServices List. */
public final class CommunicationServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listBySubscription.json
*/
/**
* Sample code: List by subscription.
@@ -214,7 +214,7 @@ public final class CommunicationServicesListSamples {
/** Samples for CommunicationServices ListByResourceGroup. */
public final class CommunicationServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listByResourceGroup.json
*/
/**
* Sample code: List by resource group.
@@ -233,7 +233,7 @@ public final class CommunicationServicesListByResourceGroupSamples {
/** Samples for CommunicationServices ListKeys. */
public final class CommunicationServicesListKeysSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/listKeys.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listKeys.json
*/
/**
* Sample code: List keys.
@@ -257,7 +257,7 @@ import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
/** Samples for CommunicationServices RegenerateKey. */
public final class CommunicationServicesRegenerateKeySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/regenerateKey.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/regenerateKey.json
*/
/**
* Sample code: Regenerate key.
@@ -286,7 +286,7 @@ import java.util.Map;
/** Samples for CommunicationServices Update. */
public final class CommunicationServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/update.json
*/
/**
* Sample code: Update resource.
@@ -325,7 +325,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
/** Samples for Domains CancelVerification. */
public final class DomainsCancelVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/cancelVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/cancelVerification.json
*/
/**
* Sample code: Cancel verification.
@@ -353,7 +353,7 @@ import com.azure.resourcemanager.communication.models.DomainManagement;
/** Samples for Domains CreateOrUpdate. */
public final class DomainsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/createOrUpdate.json
*/
/**
* Sample code: Create or update Domains resource.
@@ -379,7 +379,7 @@ public final class DomainsCreateOrUpdateSamples {
/** Samples for Domains Delete. */
public final class DomainsDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/delete.json
*/
/**
* Sample code: Delete Domains resource.
@@ -400,7 +400,7 @@ public final class DomainsDeleteSamples {
/** Samples for Domains Get. */
public final class DomainsGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/get.json
*/
/**
* Sample code: Get Domains resource.
@@ -425,7 +425,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
/** Samples for Domains InitiateVerification. */
public final class DomainsInitiateVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/initiateVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/initiateVerification.json
*/
/**
* Sample code: Initiate verification.
@@ -451,7 +451,7 @@ public final class DomainsInitiateVerificationSamples {
/** Samples for Domains ListByEmailServiceResource. */
public final class DomainsListByEmailServiceResourceSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/listByEmailService.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/listByEmailService.json
*/
/**
* Sample code: List Domains resources by EmailServiceName.
@@ -476,7 +476,7 @@ import com.azure.resourcemanager.communication.models.UserEngagementTracking;
/** Samples for Domains Update. */
public final class DomainsUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/update.json
*/
/**
* Sample code: Update Domains resource.
@@ -501,7 +501,7 @@ public final class DomainsUpdateSamples {
/** Samples for EmailServices CreateOrUpdate. */
public final class EmailServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/createOrUpdate.json
*/
/**
* Sample code: Create or update EmailService resource.
@@ -527,7 +527,7 @@ public final class EmailServicesCreateOrUpdateSamples {
/** Samples for EmailServices Delete. */
public final class EmailServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/delete.json
*/
/**
* Sample code: Delete EmailService resource.
@@ -547,7 +547,7 @@ public final class EmailServicesDeleteSamples {
/** Samples for EmailServices GetByResourceGroup. */
public final class EmailServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/get.json
*/
/**
* Sample code: Get EmailService resource.
@@ -569,7 +569,7 @@ public final class EmailServicesGetByResourceGroupSamples {
/** Samples for EmailServices List. */
public final class EmailServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listBySubscription.json
*/
/**
* Sample code: List EmailService resources by subscription.
@@ -589,7 +589,7 @@ public final class EmailServicesListSamples {
/** Samples for EmailServices ListByResourceGroup. */
public final class EmailServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listByResourceGroup.json
*/
/**
* Sample code: List EmailService resources by resource group.
@@ -609,7 +609,7 @@ public final class EmailServicesListByResourceGroupSamples {
/** Samples for EmailServices ListVerifiedExchangeOnlineDomains. */
public final class EmailServicesListVerifiedExchangeOnlineDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/getVerifiedExchangeOnlineDomains.json
*/
/**
* Sample code: Get verified Exchange Online domains.
@@ -633,7 +633,7 @@ import java.util.Map;
/** Samples for EmailServices Update. */
public final class EmailServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/update.json
*/
/**
* Sample code: Update EmailService resource.
@@ -670,7 +670,7 @@ public final class EmailServicesUpdateSamples {
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/operationsList.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/operationsList.json
*/
/**
* Sample code: Operations_List.
@@ -689,7 +689,7 @@ public final class OperationsListSamples {
/** Samples for SenderUsernames CreateOrUpdate. */
public final class SenderUsernamesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/createOrUpdate.json
*/
/**
* Sample code: Create or update SenderUsernames resource.
@@ -715,7 +715,7 @@ public final class SenderUsernamesCreateOrUpdateSamples {
/** Samples for SenderUsernames Delete. */
public final class SenderUsernamesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/delete.json
*/
/**
* Sample code: Delete SenderUsernames resource.
@@ -742,7 +742,7 @@ public final class SenderUsernamesDeleteSamples {
/** Samples for SenderUsernames Get. */
public final class SenderUsernamesGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/get.json
*/
/**
* Sample code: Get SenderUsernames resource.
@@ -769,7 +769,7 @@ public final class SenderUsernamesGetSamples {
/** Samples for SenderUsernames ListByDomains. */
public final class SenderUsernamesListByDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/listByDomain.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/listByDomain.json
*/
/**
* Sample code: Get SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/pom.xml b/sdk/communication/azure-resourcemanager-communication/pom.xml
index 23088bee0e72c..5796c1cc354d0 100644
--- a/sdk/communication/azure-resourcemanager-communication/pom.xml
+++ b/sdk/communication/azure-resourcemanager-communication/pom.xml
@@ -18,7 +18,7 @@
jar
Microsoft Azure SDK for Communication Management
- This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-preview-2023-03.
+ This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-2023-03.
https://github.com/Azure/azure-sdk-for-java
@@ -45,7 +45,6 @@
UTF-8
0
0
- true
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
index de9860b5609d5..83c6b5fc8ead1 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
@@ -219,7 +219,7 @@ public CommunicationManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.communication")
.append("/")
- .append("1.1.0-beta.4");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
index 88f6faffb27cd..d327e7da80114 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
@@ -194,7 +194,7 @@ public SenderUsernamesClient getSenderUsernames() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-03-01-preview";
+ this.apiVersion = "2023-03-31";
this.operations = new OperationsClientImpl(this);
this.communicationServices = new CommunicationServicesClientImpl(this);
this.domains = new DomainsClientImpl(this);
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java
index bff66fbf07a64..94d25eeb44ee7 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilitySamples.java
@@ -9,7 +9,7 @@
/** Samples for CommunicationServices CheckNameAvailability. */
public final class CommunicationServicesCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityAvailable.json
*/
/**
* Sample code: Check name availability available.
@@ -28,7 +28,7 @@ public static void checkNameAvailabilityAvailable(
}
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityUnavailable.json
*/
/**
* Sample code: Check name availability unavailable.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java
index 83fb21054310a..0094fee116b30 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices CreateOrUpdate. */
public final class CommunicationServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/createOrUpdate.json
*/
/**
* Sample code: Create or update resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java
index e5f56b6ff1340..8ac2049c40f73 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices Delete. */
public final class CommunicationServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/delete.json
*/
/**
* Sample code: Delete resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java
index ae1712ad866c0..ae2f31ce3496a 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices GetByResourceGroup. */
public final class CommunicationServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/get.json
*/
/**
* Sample code: Get resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java
index 79622167e5752..518ca5e3831b9 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubSamples.java
@@ -9,7 +9,7 @@
/** Samples for CommunicationServices LinkNotificationHub. */
public final class CommunicationServicesLinkNotificationHubSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/linkNotificationHub.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/linkNotificationHub.json
*/
/**
* Sample code: Link notification hub.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java
index e3f343e43ef7e..615f4b7a44fa7 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices ListByResourceGroup. */
public final class CommunicationServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listByResourceGroup.json
*/
/**
* Sample code: List by resource group.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java
index 68ac9623610c0..af3882ca22ca9 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListKeysSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices ListKeys. */
public final class CommunicationServicesListKeysSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/listKeys.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listKeys.json
*/
/**
* Sample code: List keys.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java
index 0493ee86a0c43..6eb24ffb78ec5 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for CommunicationServices List. */
public final class CommunicationServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listBySubscription.json
*/
/**
* Sample code: List by subscription.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java
index 6e4985ca7dd89..70e7cb613a711 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesRegenerateKeySamples.java
@@ -10,7 +10,7 @@
/** Samples for CommunicationServices RegenerateKey. */
public final class CommunicationServicesRegenerateKeySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/regenerateKey.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/regenerateKey.json
*/
/**
* Sample code: Regenerate key.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java
index 5cb45b163d3fa..efde62cb7f859 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/CommunicationServicesUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for CommunicationServices Update. */
public final class CommunicationServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/update.json
*/
/**
* Sample code: Update resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java
index 52cfca97b5d21..b849132993498 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCancelVerificationSamples.java
@@ -10,7 +10,7 @@
/** Samples for Domains CancelVerification. */
public final class DomainsCancelVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/cancelVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/cancelVerification.json
*/
/**
* Sample code: Cancel verification.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java
index 018e4b3feab31..cec0b60193253 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateSamples.java
@@ -9,7 +9,7 @@
/** Samples for Domains CreateOrUpdate. */
public final class DomainsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/createOrUpdate.json
*/
/**
* Sample code: Create or update Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java
index 03e132d4a83be..9f0530177b658 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for Domains Delete. */
public final class DomainsDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/delete.json
*/
/**
* Sample code: Delete Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java
index fe83c8bee33f9..71e1cc374e189 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for Domains Get. */
public final class DomainsGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/get.json
*/
/**
* Sample code: Get Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java
index 855c734cac1ff..e372b6e96a3b4 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsInitiateVerificationSamples.java
@@ -10,7 +10,7 @@
/** Samples for Domains InitiateVerification. */
public final class DomainsInitiateVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/initiateVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/initiateVerification.json
*/
/**
* Sample code: Initiate verification.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java
index c7601b69b35cd..77b7a0a290837 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceSamples.java
@@ -7,7 +7,7 @@
/** Samples for Domains ListByEmailServiceResource. */
public final class DomainsListByEmailServiceResourceSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/listByEmailService.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/listByEmailService.json
*/
/**
* Sample code: List Domains resources by EmailServiceName.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java
index 4455948253a62..da4491cb2aafd 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/DomainsUpdateSamples.java
@@ -10,7 +10,7 @@
/** Samples for Domains Update. */
public final class DomainsUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/domains/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/update.json
*/
/**
* Sample code: Update Domains resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java
index 648bfd365f37e..62bca15965192 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices CreateOrUpdate. */
public final class EmailServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/createOrUpdate.json
*/
/**
* Sample code: Create or update EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java
index 1b87b938fb854..bb87e893d4bb7 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices Delete. */
public final class EmailServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/delete.json
*/
/**
* Sample code: Delete EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java
index f255517dcf645..3540747770013 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices GetByResourceGroup. */
public final class EmailServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/get.json
*/
/**
* Sample code: Get EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java
index d856f1b2e659b..15403da56ebeb 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices ListByResourceGroup. */
public final class EmailServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listByResourceGroup.json
*/
/**
* Sample code: List EmailService resources by resource group.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java
index b9db36fc4ba04..e9be5022bab3a 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices List. */
public final class EmailServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listBySubscription.json
*/
/**
* Sample code: List EmailService resources by subscription.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java
index 173cdc7d44c84..fb4990f2c8aae 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsSamples.java
@@ -7,7 +7,7 @@
/** Samples for EmailServices ListVerifiedExchangeOnlineDomains. */
public final class EmailServicesListVerifiedExchangeOnlineDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/getVerifiedExchangeOnlineDomains.json
*/
/**
* Sample code: Get verified Exchange Online domains.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java
index c18f7176c4c39..a4aa463e31976 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/EmailServicesUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for EmailServices Update. */
public final class EmailServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/emailServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/update.json
*/
/**
* Sample code: Update EmailService resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java
index 0e713cb3ffbf6..78a43fc8327e8 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/OperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/communicationServices/operationsList.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/operationsList.json
*/
/**
* Sample code: Operations_List.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java
index 840a2a36311bb..2d13fd6fbebf6 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames CreateOrUpdate. */
public final class SenderUsernamesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/createOrUpdate.json
*/
/**
* Sample code: Create or update SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java
index 00f6d9ef4b06c..bc0b61fe67af9 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames Delete. */
public final class SenderUsernamesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/delete.json
*/
/**
* Sample code: Delete SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java
index e910012751ac3..cf5f4d1cce8b2 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames Get. */
public final class SenderUsernamesGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/get.json
*/
/**
* Sample code: Get SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java
index 6d537ae148905..939a62d48a91f 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/samples/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsSamples.java
@@ -7,7 +7,7 @@
/** Samples for SenderUsernames ListByDomains. */
public final class SenderUsernamesListByDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-03-01-preview/examples/senderUsernames/listByDomain.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/listByDomain.json
*/
/**
* Sample code: Get SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityRequestTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityRequestTests.java
deleted file mode 100644
index 37555586c4370..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityRequestTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityRequest;
-import org.junit.jupiter.api.Assertions;
-
-public final class CheckNameAvailabilityRequestTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CheckNameAvailabilityRequest model =
- BinaryData
- .fromString("{\"name\":\"hab\",\"type\":\"pikxwczbyscnpqxu\"}")
- .toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("hab", model.name());
- Assertions.assertEquals("pikxwczbyscnpqxu", model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CheckNameAvailabilityRequest model =
- new CheckNameAvailabilityRequest().withName("hab").withType("pikxwczbyscnpqxu");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class);
- Assertions.assertEquals("hab", model.name());
- Assertions.assertEquals("pikxwczbyscnpqxu", model.type());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityResponseInnerTests.java
deleted file mode 100644
index b9e34c85d9516..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CheckNameAvailabilityResponseInnerTests.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CheckNameAvailabilityResponseInner;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityReason;
-import org.junit.jupiter.api.Assertions;
-
-public final class CheckNameAvailabilityResponseInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CheckNameAvailabilityResponseInner model =
- BinaryData
- .fromString("{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"iwbybrkxvdumjg\"}")
- .toObject(CheckNameAvailabilityResponseInner.class);
- Assertions.assertEquals(false, model.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason());
- Assertions.assertEquals("iwbybrkxvdumjg", model.message());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CheckNameAvailabilityResponseInner model =
- new CheckNameAvailabilityResponseInner()
- .withNameAvailable(false)
- .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS)
- .withMessage("iwbybrkxvdumjg");
- model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class);
- Assertions.assertEquals(false, model.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason());
- Assertions.assertEquals("iwbybrkxvdumjg", model.message());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicePropertiesTests.java
deleted file mode 100644
index 0a7918d5a26b4..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicePropertiesTests.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServicePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceProperties model =
- BinaryData
- .fromString(
- "{\"provisioningState\":\"Unknown\",\"hostName\":\"kjfkg\",\"dataLocation\":\"awxklr\",\"notificationHubId\":\"lwckbasyypnddhs\",\"version\":\"bacphejko\",\"immutableResourceId\":\"nqgoulzndli\",\"linkedDomains\":[\"qkgfgibma\",\"gakeqsr\"]}")
- .toObject(CommunicationServiceProperties.class);
- Assertions.assertEquals("awxklr", model.dataLocation());
- Assertions.assertEquals("qkgfgibma", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceProperties model =
- new CommunicationServiceProperties()
- .withDataLocation("awxklr")
- .withLinkedDomains(Arrays.asList("qkgfgibma", "gakeqsr"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceProperties.class);
- Assertions.assertEquals("awxklr", model.dataLocation());
- Assertions.assertEquals("qkgfgibma", model.linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceInnerTests.java
deleted file mode 100644
index 0bd0966dface5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceInnerTests.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceResourceInner;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"Moving\",\"hostName\":\"xxwr\",\"dataLocation\":\"jdous\",\"notificationHubId\":\"qvkoc\",\"version\":\"jdkwtnhxbnjb\",\"immutableResourceId\":\"sqrglssainq\",\"linkedDomains\":[\"nzl\",\"jfm\",\"pee\",\"vmgxsab\"]},\"location\":\"qduujitcjczdz\",\"tags\":{\"wrwjfeu\":\"dhkrwpdappdsbdk\",\"zdatqxhocdg\":\"nhutjeltmrldhugj\"},\"id\":\"ablgphuticndvk\",\"name\":\"ozwyiftyhxhuro\",\"type\":\"ftyxolniw\"}")
- .toObject(CommunicationServiceResourceInner.class);
- Assertions.assertEquals("qduujitcjczdz", model.location());
- Assertions.assertEquals("dhkrwpdappdsbdk", model.tags().get("wrwjfeu"));
- Assertions.assertEquals("jdous", model.dataLocation());
- Assertions.assertEquals("nzl", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceResourceInner model =
- new CommunicationServiceResourceInner()
- .withLocation("qduujitcjczdz")
- .withTags(mapOf("wrwjfeu", "dhkrwpdappdsbdk", "zdatqxhocdg", "nhutjeltmrldhugj"))
- .withDataLocation("jdous")
- .withLinkedDomains(Arrays.asList("nzl", "jfm", "pee", "vmgxsab"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceResourceInner.class);
- Assertions.assertEquals("qduujitcjczdz", model.location());
- Assertions.assertEquals("dhkrwpdappdsbdk", model.tags().get("wrwjfeu"));
- Assertions.assertEquals("jdous", model.dataLocation());
- Assertions.assertEquals("nzl", model.linkedDomains().get(0));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceListTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceListTests.java
deleted file mode 100644
index 5e4447b99145d..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceListTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceResourceInner;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResourceList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Running\",\"hostName\":\"mkkvnip\",\"dataLocation\":\"oxzjnchgejspod\",\"notificationHubId\":\"ilzyd\",\"version\":\"o\",\"immutableResourceId\":\"yahux\",\"linkedDomains\":[]},\"location\":\"mqnjaqw\",\"tags\":{\"gjvw\":\"sprozvcput\",\"dvpjhulsuuvmk\":\"fdatsc\",\"jdpvwryo\":\"ozkrwfndiodjpslw\"},\"id\":\"psoacctazakljl\",\"name\":\"hbcryffdfdosyge\",\"type\":\"paojakhmsbzjh\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"hostName\":\"dphlxaolt\",\"dataLocation\":\"qtrgqjbpfzfsinzg\",\"notificationHubId\":\"cjrwzoxxjtfellu\",\"version\":\"zitonpeqfpjkjl\",\"immutableResourceId\":\"fpdvhpfxxypi\",\"linkedDomains\":[]},\"location\":\"mayhuybbkpodepoo\",\"tags\":{\"eotusivyevc\":\"uvamiheognarxzxt\",\"un\":\"iqihn\",\"fygxgispemvtzfk\":\"bwjzr\"},\"id\":\"fublj\",\"name\":\"fxqeof\",\"type\":\"aeqjhqjbasvms\"}],\"nextLink\":\"qulngsntnbybkzgc\"}")
- .toObject(CommunicationServiceResourceList.class);
- Assertions.assertEquals("mqnjaqw", model.value().get(0).location());
- Assertions.assertEquals("sprozvcput", model.value().get(0).tags().get("gjvw"));
- Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).dataLocation());
- Assertions.assertEquals("qulngsntnbybkzgc", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceResourceList model =
- new CommunicationServiceResourceList()
- .withValue(
- Arrays
- .asList(
- new CommunicationServiceResourceInner()
- .withLocation("mqnjaqw")
- .withTags(
- mapOf(
- "gjvw",
- "sprozvcput",
- "dvpjhulsuuvmk",
- "fdatsc",
- "jdpvwryo",
- "ozkrwfndiodjpslw"))
- .withDataLocation("oxzjnchgejspod")
- .withLinkedDomains(Arrays.asList()),
- new CommunicationServiceResourceInner()
- .withLocation("mayhuybbkpodepoo")
- .withTags(
- mapOf("eotusivyevc", "uvamiheognarxzxt", "un", "iqihn", "fygxgispemvtzfk", "bwjzr"))
- .withDataLocation("qtrgqjbpfzfsinzg")
- .withLinkedDomains(Arrays.asList())))
- .withNextLink("qulngsntnbybkzgc");
- model = BinaryData.fromObject(model).toObject(CommunicationServiceResourceList.class);
- Assertions.assertEquals("mqnjaqw", model.value().get(0).location());
- Assertions.assertEquals("sprozvcput", model.value().get(0).tags().get("gjvw"));
- Assertions.assertEquals("oxzjnchgejspod", model.value().get(0).dataLocation());
- Assertions.assertEquals("qulngsntnbybkzgc", model.nextLink());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceUpdateTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceUpdateTests.java
deleted file mode 100644
index 3fd83c2a26bda..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceResourceUpdateTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResourceUpdate;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceResourceUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceResourceUpdate model =
- BinaryData
- .fromString(
- "{\"properties\":{\"linkedDomains\":[\"qqedqytbciqfou\",\"lmmnkzsmodmglo\"]},\"tags\":{\"wtmutduq\":\"b\",\"spwgcuertumkdosv\":\"ta\"}}")
- .toObject(CommunicationServiceResourceUpdate.class);
- Assertions.assertEquals("b", model.tags().get("wtmutduq"));
- Assertions.assertEquals("qqedqytbciqfou", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceResourceUpdate model =
- new CommunicationServiceResourceUpdate()
- .withTags(mapOf("wtmutduq", "b", "spwgcuertumkdosv", "ta"))
- .withLinkedDomains(Arrays.asList("qqedqytbciqfou", "lmmnkzsmodmglo"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceResourceUpdate.class);
- Assertions.assertEquals("b", model.tags().get("wtmutduq"));
- Assertions.assertEquals("qqedqytbciqfou", model.linkedDomains().get(0));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceUpdatePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceUpdatePropertiesTests.java
deleted file mode 100644
index 6c61a876a7cc4..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServiceUpdatePropertiesTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.CommunicationServiceUpdateProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class CommunicationServiceUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CommunicationServiceUpdateProperties model =
- BinaryData
- .fromString("{\"linkedDomains\":[\"bmdg\",\"bjf\",\"dgmb\"]}")
- .toObject(CommunicationServiceUpdateProperties.class);
- Assertions.assertEquals("bmdg", model.linkedDomains().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CommunicationServiceUpdateProperties model =
- new CommunicationServiceUpdateProperties().withLinkedDomains(Arrays.asList("bmdg", "bjf", "dgmb"));
- model = BinaryData.fromObject(model).toObject(CommunicationServiceUpdateProperties.class);
- Assertions.assertEquals("bmdg", model.linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilityWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilityWithResponseMockTests.java
deleted file mode 100644
index 3a7269410ac40..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCheckNameAvailabilityWithResponseMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityReason;
-import com.azure.resourcemanager.communication.models.CheckNameAvailabilityResponse;
-import com.azure.resourcemanager.communication.models.NameAvailabilityParameters;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CommunicationServicesCheckNameAvailabilityWithResponseMockTests {
- @Test
- public void testCheckNameAvailabilityWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"eoejzic\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CheckNameAvailabilityResponse response =
- manager
- .communicationServices()
- .checkNameAvailabilityWithResponse(
- new NameAvailabilityParameters().withName("mrbpizcdrqj").withType("pyd"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals(true, response.nameAvailable());
- Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason());
- Assertions.assertEquals("eoejzic", response.message());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateMockTests.java
deleted file mode 100644
index e1f67ca8d03a7..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CommunicationServicesCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"hostName\":\"ids\",\"dataLocation\":\"yonobgl\",\"notificationHubId\":\"cq\",\"version\":\"ccm\",\"immutableResourceId\":\"udxytlmoyrx\",\"linkedDomains\":[\"u\",\"wpzntxhdzh\"]},\"location\":\"qj\",\"tags\":{\"pycanuzbpz\":\"kfrlhrxsbky\"},\"id\":\"afkuwb\",\"name\":\"rnwb\",\"type\":\"ehhseyvjusrts\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CommunicationServiceResource response =
- manager
- .communicationServices()
- .define("upedeojnabckhs")
- .withRegion("cnjbkcnxdhbt")
- .withExistingResourceGroup("baiuebbaumny")
- .withTags(mapOf("wpn", "h", "mclfplphoxuscr", "jtoqne"))
- .withDataLocation("tfhvpesapskrdqmh")
- .withLinkedDomains(Arrays.asList("upqsx", "nmic", "kvceoveilovnotyf"))
- .create();
-
- Assertions.assertEquals("qj", response.location());
- Assertions.assertEquals("kfrlhrxsbky", response.tags().get("pycanuzbpz"));
- Assertions.assertEquals("yonobgl", response.dataLocation());
- Assertions.assertEquals("u", response.linkedDomains().get(0));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteMockTests.java
deleted file mode 100644
index 94e5afc562332..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CommunicationServicesDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.communicationServices().delete("bhvgy", "gu", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index b82586ca7f9fb..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CommunicationServicesGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Deleting\",\"hostName\":\"xdbabphlwr\",\"dataLocation\":\"lfktsths\",\"notificationHubId\":\"ocmnyyazttbtwwrq\",\"version\":\"edckzywbiexzfey\",\"immutableResourceId\":\"axibxujw\",\"linkedDomains\":[\"walm\",\"zyoxaepdkzjan\",\"ux\",\"hdwbavxbniwdjs\"]},\"location\":\"tsdbpgn\",\"tags\":{\"pzxbz\":\"x\"},\"id\":\"fzab\",\"name\":\"lcuhxwtctyqiklb\",\"type\":\"ovplw\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- CommunicationServiceResource response =
- manager
- .communicationServices()
- .getByResourceGroupWithResponse("nrs", "nlqidybyxczf", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("tsdbpgn", response.location());
- Assertions.assertEquals("x", response.tags().get("pzxbz"));
- Assertions.assertEquals("lfktsths", response.dataLocation());
- Assertions.assertEquals("walm", response.linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubWithResponseMockTests.java
deleted file mode 100644
index c9a3d30efa9f4..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesLinkNotificationHubWithResponseMockTests.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
-import com.azure.resourcemanager.communication.models.LinkedNotificationHub;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CommunicationServicesLinkNotificationHubWithResponseMockTests {
- @Test
- public void testLinkNotificationHubWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"resourceId\":\"ixzbinjeputtmryw\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- LinkedNotificationHub response =
- manager
- .communicationServices()
- .linkNotificationHubWithResponse(
- "ifsjttgzfbishcb",
- "hajdeyeamdpha",
- new LinkNotificationHubParameters()
- .withResourceId("alpbuxwgipwhon")
- .withConnectionString("wkgshwa"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("ixzbinjeputtmryw", response.resourceId());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupMockTests.java
deleted file mode 100644
index dbaf40b565128..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CommunicationServicesListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"hostName\":\"tbgsncghkj\",\"dataLocation\":\"szzhbijhtxfvgxbf\",\"notificationHubId\":\"xnehmpvec\",\"version\":\"odebfqkkrbmpu\",\"immutableResourceId\":\"riwflzlfb\",\"linkedDomains\":[\"uzycispnqza\"]},\"location\":\"gkbrpyyd\",\"tags\":{\"agnb\":\"nuqqkpikadrgvt\",\"fsiarbutr\":\"ynhijggme\",\"jrunmpxtt\":\"vpnazzm\"},\"id\":\"bh\",\"name\":\"bnlankxmyskpb\",\"type\":\"enbtkcxywny\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.communicationServices().listByResourceGroup("uujqgidokgjljyo", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("gkbrpyyd", response.iterator().next().location());
- Assertions.assertEquals("nuqqkpikadrgvt", response.iterator().next().tags().get("agnb"));
- Assertions.assertEquals("szzhbijhtxfvgxbf", response.iterator().next().dataLocation());
- Assertions.assertEquals("uzycispnqza", response.iterator().next().linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListMockTests.java
deleted file mode 100644
index 86afbbd559b64..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/CommunicationServicesListMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class CommunicationServicesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"hostName\":\"ftiyqzrnkcq\",\"dataLocation\":\"yx\",\"notificationHubId\":\"hzls\",\"version\":\"ohoqqnwvlryav\",\"immutableResourceId\":\"heun\",\"linkedDomains\":[\"hgyxzkonoc\",\"koklya\",\"uconuqszfkbey\",\"ewrmjmwvvjektc\"]},\"location\":\"enhwlrs\",\"tags\":{\"qdqgbi\":\"zpwv\",\"fcivfsnkym\":\"ylihkaetckt\",\"jf\":\"ctq\",\"fuwutttxf\":\"ebrjcxe\"},\"id\":\"jrbirphxepcyv\",\"name\":\"hfnljkyq\",\"type\":\"j\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.communicationServices().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("enhwlrs", response.iterator().next().location());
- Assertions.assertEquals("zpwv", response.iterator().next().tags().get("qdqgbi"));
- Assertions.assertEquals("yx", response.iterator().next().dataLocation());
- Assertions.assertEquals("hgyxzkonoc", response.iterator().next().linkedDomains().get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DnsRecordTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DnsRecordTests.java
deleted file mode 100644
index 9e85b4afcc2cc..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DnsRecordTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.DnsRecord;
-
-public final class DnsRecordTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DnsRecord model =
- BinaryData
- .fromString("{\"type\":\"dxob\",\"name\":\"dxkqpx\",\"value\":\"ajionpimexgstxg\",\"ttl\":1489591694}")
- .toObject(DnsRecord.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DnsRecord model = new DnsRecord();
- model = BinaryData.fromObject(model).toObject(DnsRecord.class);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainPropertiesVerificationRecordsTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainPropertiesVerificationRecordsTests.java
deleted file mode 100644
index 0970c97cc7f04..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainPropertiesVerificationRecordsTests.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.DnsRecord;
-import com.azure.resourcemanager.communication.models.DomainPropertiesVerificationRecords;
-
-public final class DomainPropertiesVerificationRecordsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DomainPropertiesVerificationRecords model =
- BinaryData
- .fromString(
- "{\"Domain\":{\"type\":\"pteehzzv\",\"name\":\"yqrimzin\",\"value\":\"swjdkirso\",\"ttl\":1633669342},\"SPF\":{\"type\":\"crmnohjtckwhds\",\"name\":\"fiyipjxsqwpgrj\",\"value\":\"norcjxvsnbyxqab\",\"ttl\":1299140464},\"DKIM\":{\"type\":\"cyshurzafbljjgp\",\"name\":\"oq\",\"value\":\"mkljavb\",\"ttl\":1581174340},\"DKIM2\":{\"type\":\"ajzyul\",\"name\":\"u\",\"value\":\"krlkhbzhfepg\",\"ttl\":701234104},\"DMARC\":{\"type\":\"zloc\",\"name\":\"c\",\"value\":\"ierhhbcsglummaj\",\"ttl\":1273206758}}")
- .toObject(DomainPropertiesVerificationRecords.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DomainPropertiesVerificationRecords model =
- new DomainPropertiesVerificationRecords()
- .withDomain(new DnsRecord())
- .withSpf(new DnsRecord())
- .withDkim(new DnsRecord())
- .withDkim2(new DnsRecord())
- .withDmarc(new DnsRecord());
- model = BinaryData.fromObject(model).toObject(DomainPropertiesVerificationRecords.class);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceInnerTests.java
deleted file mode 100644
index d37b04f8814bf..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceInnerTests.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.DomainResourceInner;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DomainResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DomainResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"Running\",\"dataLocation\":\"l\",\"fromSenderDomain\":\"uvfqawrlyxwj\",\"mailFromSenderDomain\":\"prbnwbxgjvtbv\",\"domainManagement\":\"AzureManaged\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Disabled\"},\"location\":\"uqfprwzw\",\"tags\":{\"a\":\"uitnwuiz\"},\"id\":\"x\",\"name\":\"fizuckyf\",\"type\":\"hr\"}")
- .toObject(DomainResourceInner.class);
- Assertions.assertEquals("uqfprwzw", model.location());
- Assertions.assertEquals("uitnwuiz", model.tags().get("a"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DomainResourceInner model =
- new DomainResourceInner()
- .withLocation("uqfprwzw")
- .withTags(mapOf("a", "uitnwuiz"))
- .withDomainManagement(DomainManagement.AZURE_MANAGED)
- .withUserEngagementTracking(UserEngagementTracking.DISABLED);
- model = BinaryData.fromObject(model).toObject(DomainResourceInner.class);
- Assertions.assertEquals("uqfprwzw", model.location());
- Assertions.assertEquals("uitnwuiz", model.tags().get("a"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceListTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceListTests.java
deleted file mode 100644
index 4c7c4261603a3..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainResourceListTests.java
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.DomainResourceInner;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResourceList;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class DomainResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- DomainResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"dataLocation\":\"jjxhvpmo\",\"fromSenderDomain\":\"xhdzxibqeojnx\",\"mailFromSenderDomain\":\"zvddntwndeicbtwn\",\"domainManagement\":\"AzureManaged\",\"userEngagementTracking\":\"Enabled\"},\"location\":\"hrhcffcyddglmjth\",\"tags\":{\"hix\":\"wpyeicxmqciwqvh\"},\"id\":\"igdtopbob\",\"name\":\"og\",\"type\":\"m\"},{\"properties\":{\"provisioningState\":\"Moving\",\"dataLocation\":\"a\",\"fromSenderDomain\":\"rzayv\",\"mailFromSenderDomain\":\"pgvdf\",\"domainManagement\":\"AzureManaged\",\"userEngagementTracking\":\"Enabled\"},\"location\":\"utqxlngx\",\"tags\":{\"xkrxdqmi\":\"gug\",\"abhjybi\":\"tthzrvqd\",\"ktzlcuiywg\":\"ehoqfbowskan\",\"nhzgpphrcgyn\":\"ywgndrv\"},\"id\":\"ocpecfvmmco\",\"name\":\"fsxlzevgbmqjqa\",\"type\":\"c\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"dataLocation\":\"kwlzuvccfwnfn\",\"fromSenderDomain\":\"cfionl\",\"mailFromSenderDomain\":\"x\",\"domainManagement\":\"CustomerManagedInExchangeOnline\",\"userEngagementTracking\":\"Enabled\"},\"location\":\"dpnqbq\",\"tags\":{\"mpmngnzscxaqwoo\":\"rjfeallnwsubisnj\",\"njeaseipheofloke\":\"hcbonqvpkvlr\",\"enjbdlwtgrhp\":\"y\",\"umasxazjpq\":\"jp\"},\"id\":\"e\",\"name\":\"ualhbxxhejj\",\"type\":\"zvdudgwdslfhotwm\"}],\"nextLink\":\"npwlbjnpg\"}")
- .toObject(DomainResourceList.class);
- Assertions.assertEquals("hrhcffcyddglmjth", model.value().get(0).location());
- Assertions.assertEquals("wpyeicxmqciwqvh", model.value().get(0).tags().get("hix"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.value().get(0).domainManagement());
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.value().get(0).userEngagementTracking());
- Assertions.assertEquals("npwlbjnpg", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- DomainResourceList model =
- new DomainResourceList()
- .withValue(
- Arrays
- .asList(
- new DomainResourceInner()
- .withLocation("hrhcffcyddglmjth")
- .withTags(mapOf("hix", "wpyeicxmqciwqvh"))
- .withDomainManagement(DomainManagement.AZURE_MANAGED)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED),
- new DomainResourceInner()
- .withLocation("utqxlngx")
- .withTags(
- mapOf(
- "xkrxdqmi",
- "gug",
- "abhjybi",
- "tthzrvqd",
- "ktzlcuiywg",
- "ehoqfbowskan",
- "nhzgpphrcgyn",
- "ywgndrv"))
- .withDomainManagement(DomainManagement.AZURE_MANAGED)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED),
- new DomainResourceInner()
- .withLocation("dpnqbq")
- .withTags(
- mapOf(
- "mpmngnzscxaqwoo",
- "rjfeallnwsubisnj",
- "njeaseipheofloke",
- "hcbonqvpkvlr",
- "enjbdlwtgrhp",
- "y",
- "umasxazjpq",
- "jp"))
- .withDomainManagement(DomainManagement.CUSTOMER_MANAGED_IN_EXCHANGE_ONLINE)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED)))
- .withNextLink("npwlbjnpg");
- model = BinaryData.fromObject(model).toObject(DomainResourceList.class);
- Assertions.assertEquals("hrhcffcyddglmjth", model.value().get(0).location());
- Assertions.assertEquals("wpyeicxmqciwqvh", model.value().get(0).tags().get("hix"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, model.value().get(0).domainManagement());
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.value().get(0).userEngagementTracking());
- Assertions.assertEquals("npwlbjnpg", model.nextLink());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateMockTests.java
deleted file mode 100644
index 15f916194c5f9..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,93 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResource;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DomainsCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dataLocation\":\"ilpjzuaejxdult\",\"fromSenderDomain\":\"zbbtdzumveek\",\"mailFromSenderDomain\":\"wozuhkf\",\"domainManagement\":\"AzureManaged\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Enabled\"},\"location\":\"uwaboekqvke\",\"tags\":{\"wyjsflhhcaalnjix\":\"mvb\"},\"id\":\"sxyawjoyaqcs\",\"name\":\"yjpkiidzyexz\",\"type\":\"eli\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- DomainResource response =
- manager
- .domains()
- .define("gibtnm")
- .withRegion("qpsrknftguvri")
- .withExistingEmailService("c", "wxzvlvqhjkb")
- .withTags(mapOf("iwwroyqbexrmc", "rwmdyvxqtay", "v", "ibycno", "zhpvgqzcjrvxd", "nmefqsgzvahapj"))
- .withDomainManagement(DomainManagement.CUSTOMER_MANAGED_IN_EXCHANGE_ONLINE)
- .withUserEngagementTracking(UserEngagementTracking.ENABLED)
- .create();
-
- Assertions.assertEquals("uwaboekqvke", response.location());
- Assertions.assertEquals("mvb", response.tags().get("wyjsflhhcaalnjix"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, response.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.ENABLED, response.userEngagementTracking());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsDeleteMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsDeleteMockTests.java
deleted file mode 100644
index e0c3823adab97..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DomainsDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.domains().delete("vo", "bvmeuecivy", "zceuojgjrw", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsGetWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsGetWithResponseMockTests.java
deleted file mode 100644
index 68ea7bc66b6cf..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResource;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DomainsGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Moving\",\"dataLocation\":\"haquhcdh\",\"fromSenderDomain\":\"ualaexqpvfadmw\",\"mailFromSenderDomain\":\"crgvxpvgom\",\"domainManagement\":\"CustomerManagedInExchangeOnline\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Disabled\"},\"location\":\"k\",\"tags\":{\"uhashsfwx\":\"liourqhak\"},\"id\":\"sowzxcugi\",\"name\":\"jooxdjebw\",\"type\":\"ucww\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- DomainResource response =
- manager
- .domains()
- .getWithResponse("hspkdeemao", "mx", "gkvtmelmqkrhah", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("k", response.location());
- Assertions.assertEquals("liourqhak", response.tags().get("uhashsfwx"));
- Assertions.assertEquals(DomainManagement.CUSTOMER_MANAGED_IN_EXCHANGE_ONLINE, response.domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, response.userEngagementTracking());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceMockTests.java
deleted file mode 100644
index 3517d71c7da71..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/DomainsListByEmailServiceResourceMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.DomainManagement;
-import com.azure.resourcemanager.communication.models.DomainResource;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class DomainsListByEmailServiceResourceMockTests {
- @Test
- public void testListByEmailServiceResource() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Moving\",\"dataLocation\":\"rjaw\",\"fromSenderDomain\":\"wgxhn\",\"mailFromSenderDomain\":\"kxfbkpycgklwndn\",\"domainManagement\":\"AzureManaged\",\"verificationStates\":{},\"verificationRecords\":{},\"userEngagementTracking\":\"Disabled\"},\"location\":\"ujznb\",\"tags\":{\"ualupjmkh\":\"wuwprzqlv\"},\"id\":\"xobbcswsrt\",\"name\":\"riplrbpbewtg\",\"type\":\"fgb\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.domains().listByEmailServiceResource("ueiotwmcdyt", "x", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("ujznb", response.iterator().next().location());
- Assertions.assertEquals("wuwprzqlv", response.iterator().next().tags().get("ualupjmkh"));
- Assertions.assertEquals(DomainManagement.AZURE_MANAGED, response.iterator().next().domainManagement());
- Assertions.assertEquals(UserEngagementTracking.DISABLED, response.iterator().next().userEngagementTracking());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicePropertiesTests.java
deleted file mode 100644
index bd3f360c4b948..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicePropertiesTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.EmailServiceProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServicePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceProperties model =
- BinaryData
- .fromString("{\"provisioningState\":\"Failed\",\"dataLocation\":\"ofqweykhmenevfye\"}")
- .toObject(EmailServiceProperties.class);
- Assertions.assertEquals("ofqweykhmenevfye", model.dataLocation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceProperties model = new EmailServiceProperties().withDataLocation("ofqweykhmenevfye");
- model = BinaryData.fromObject(model).toObject(EmailServiceProperties.class);
- Assertions.assertEquals("ofqweykhmenevfye", model.dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceInnerTests.java
deleted file mode 100644
index 474d8fb685408..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceInnerTests.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.EmailServiceResourceInner;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServiceResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"Creating\",\"dataLocation\":\"dehxnltyfsoppu\"},\"location\":\"esnzwde\",\"tags\":{\"qvudwxdndnvowgu\":\"vorxzdmohct\"},\"id\":\"jugwdkcglhsl\",\"name\":\"zj\",\"type\":\"yggdtjixh\"}")
- .toObject(EmailServiceResourceInner.class);
- Assertions.assertEquals("esnzwde", model.location());
- Assertions.assertEquals("vorxzdmohct", model.tags().get("qvudwxdndnvowgu"));
- Assertions.assertEquals("dehxnltyfsoppu", model.dataLocation());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceResourceInner model =
- new EmailServiceResourceInner()
- .withLocation("esnzwde")
- .withTags(mapOf("qvudwxdndnvowgu", "vorxzdmohct"))
- .withDataLocation("dehxnltyfsoppu");
- model = BinaryData.fromObject(model).toObject(EmailServiceResourceInner.class);
- Assertions.assertEquals("esnzwde", model.location());
- Assertions.assertEquals("vorxzdmohct", model.tags().get("qvudwxdndnvowgu"));
- Assertions.assertEquals("dehxnltyfsoppu", model.dataLocation());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceListTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceListTests.java
deleted file mode 100644
index 57a6fbef2430c..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceListTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.EmailServiceResourceInner;
-import com.azure.resourcemanager.communication.models.EmailServiceResourceList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServiceResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceResourceList model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"dataLocation\":\"ypvhezrkg\"},\"location\":\"c\",\"tags\":{\"jpkcattpng\":\"fovgmkqsleyyvxy\",\"czsqpjhvm\":\"cr\"},\"id\":\"ajvnysounqe\",\"name\":\"a\",\"type\":\"oaeupfhyhltrpmo\"},{\"properties\":{\"provisioningState\":\"Updating\",\"dataLocation\":\"matuok\"},\"location\":\"fu\",\"tags\":{\"zydagfuaxbezyiuo\":\"odsfcpkvxodpuozm\",\"dxwzywqsmbsurexi\":\"ktwh\",\"yocf\":\"o\"},\"id\":\"fksymddystki\",\"name\":\"uxh\",\"type\":\"yudxorrqnbp\"}],\"nextLink\":\"zvyifqrvkdvj\"}")
- .toObject(EmailServiceResourceList.class);
- Assertions.assertEquals("c", model.value().get(0).location());
- Assertions.assertEquals("fovgmkqsleyyvxy", model.value().get(0).tags().get("jpkcattpng"));
- Assertions.assertEquals("ypvhezrkg", model.value().get(0).dataLocation());
- Assertions.assertEquals("zvyifqrvkdvj", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceResourceList model =
- new EmailServiceResourceList()
- .withValue(
- Arrays
- .asList(
- new EmailServiceResourceInner()
- .withLocation("c")
- .withTags(mapOf("jpkcattpng", "fovgmkqsleyyvxy", "czsqpjhvm", "cr"))
- .withDataLocation("ypvhezrkg"),
- new EmailServiceResourceInner()
- .withLocation("fu")
- .withTags(
- mapOf(
- "zydagfuaxbezyiuo",
- "odsfcpkvxodpuozm",
- "dxwzywqsmbsurexi",
- "ktwh",
- "yocf",
- "o"))
- .withDataLocation("matuok")))
- .withNextLink("zvyifqrvkdvj");
- model = BinaryData.fromObject(model).toObject(EmailServiceResourceList.class);
- Assertions.assertEquals("c", model.value().get(0).location());
- Assertions.assertEquals("fovgmkqsleyyvxy", model.value().get(0).tags().get("jpkcattpng"));
- Assertions.assertEquals("ypvhezrkg", model.value().get(0).dataLocation());
- Assertions.assertEquals("zvyifqrvkdvj", model.nextLink());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceUpdateTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceUpdateTests.java
deleted file mode 100644
index 52fb8eebf1eca..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServiceResourceUpdateTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.EmailServiceResourceUpdate;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class EmailServiceResourceUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EmailServiceResourceUpdate model =
- BinaryData
- .fromString("{\"tags\":{\"vdcsitynn\":\"hybcibv\",\"f\":\"amdecte\"}}")
- .toObject(EmailServiceResourceUpdate.class);
- Assertions.assertEquals("hybcibv", model.tags().get("vdcsitynn"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EmailServiceResourceUpdate model =
- new EmailServiceResourceUpdate().withTags(mapOf("vdcsitynn", "hybcibv", "f", "amdecte"));
- model = BinaryData.fromObject(model).toObject(EmailServiceResourceUpdate.class);
- Assertions.assertEquals("hybcibv", model.tags().get("vdcsitynn"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateMockTests.java
deleted file mode 100644
index d47143470ef77..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class EmailServicesCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"dataLocation\":\"xsrz\"},\"location\":\"ucerscdntnevfi\",\"tags\":{\"weriofzpyqsem\":\"ygtdsslswt\",\"zhedplvwiw\":\"abnetshh\",\"tppjflcx\":\"bmwmbesldnkw\"},\"id\":\"gaokonzmnsikv\",\"name\":\"kqze\",\"type\":\"qkdltfz\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EmailServiceResource response =
- manager
- .emailServices()
- .define("enq")
- .withRegion("gnayqigynduh")
- .withExistingResourceGroup("ewgdrjervn")
- .withTags(mapOf("maqolbgycduie", "qlkth", "qlfmmdnbb", "tgccymvaolpss", "wyhzdx", "lzpswiydm"))
- .withDataLocation("ndoygmifthnzdnd")
- .create();
-
- Assertions.assertEquals("ucerscdntnevfi", response.location());
- Assertions.assertEquals("ygtdsslswt", response.tags().get("weriofzpyqsem"));
- Assertions.assertEquals("xsrz", response.dataLocation());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteMockTests.java
deleted file mode 100644
index 14e2e71271b2f..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class EmailServicesDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.emailServices().delete("ol", "dahzxctobg", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index f01056acf094b..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesGetByResourceGroupWithResponseMockTests.java
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class EmailServicesGetByResourceGroupWithResponseMockTests {
- @Test
- public void testGetByResourceGroupWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Unknown\",\"dataLocation\":\"napnyiropuhpigv\"},\"location\":\"ylgqgitxmedjvcsl\",\"tags\":{\"rmgucnap\":\"wwncwzzhxgk\",\"oellwp\":\"t\"},\"id\":\"fdygpfqbuaceopz\",\"name\":\"qrhhu\",\"type\":\"opppcqeq\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- EmailServiceResource response =
- manager
- .emailServices()
- .getByResourceGroupWithResponse("hnrztfol", "bnxknalaulppg", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("ylgqgitxmedjvcsl", response.location());
- Assertions.assertEquals("wwncwzzhxgk", response.tags().get("rmgucnap"));
- Assertions.assertEquals("napnyiropuhpigv", response.dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupMockTests.java
deleted file mode 100644
index 1ad18c57622a9..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListByResourceGroupMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class EmailServicesListByResourceGroupMockTests {
- @Test
- public void testListByResourceGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"dataLocation\":\"blmpewww\"},\"location\":\"krvrns\",\"tags\":{\"ohxcrsbfova\":\"q\",\"sub\":\"rruvwbhsq\",\"rxbpyb\":\"gjb\",\"twss\":\"rfbjf\"},\"id\":\"t\",\"name\":\"tpvjzbexilzznfqq\",\"type\":\"vwpm\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.emailServices().listByResourceGroup("bhsfxob", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("krvrns", response.iterator().next().location());
- Assertions.assertEquals("q", response.iterator().next().tags().get("ohxcrsbfova"));
- Assertions.assertEquals("blmpewww", response.iterator().next().dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListMockTests.java
deleted file mode 100644
index be39c0c45424e..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.EmailServiceResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class EmailServicesListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"Unknown\",\"dataLocation\":\"oizpostmgrcfbun\"},\"location\":\"fqjhhkxbpvjymj\",\"tags\":{\"n\":\"j\",\"ivkrtsw\":\"u\",\"vjfdx\":\"xqzvszjfa\"},\"id\":\"ivetvtcq\",\"name\":\"qtdo\",\"type\":\"mcbxvwvxysl\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.emailServices().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("fqjhhkxbpvjymj", response.iterator().next().location());
- Assertions.assertEquals("j", response.iterator().next().tags().get("n"));
- Assertions.assertEquals("oizpostmgrcfbun", response.iterator().next().dataLocation());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests.java
deleted file mode 100644
index be22aa33f87bf..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests.java
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.List;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class EmailServicesListVerifiedExchangeOnlineDomainsWithResponseMockTests {
- @Test
- public void testListVerifiedExchangeOnlineDomainsWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "[\"aruoujmkcjhwqyt\",\"r\",\"bnw\"]";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- List response =
- manager
- .emailServices()
- .listVerifiedExchangeOnlineDomainsWithResponse(com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("aruoujmkcjhwqyt", response.get(0));
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkNotificationHubParametersTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkNotificationHubParametersTests.java
deleted file mode 100644
index b7a54e7129c6a..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkNotificationHubParametersTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
-import org.junit.jupiter.api.Assertions;
-
-public final class LinkNotificationHubParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LinkNotificationHubParameters model =
- BinaryData
- .fromString("{\"resourceId\":\"tfwvukxgaudc\",\"connectionString\":\"snhsjcnyejhkryh\"}")
- .toObject(LinkNotificationHubParameters.class);
- Assertions.assertEquals("tfwvukxgaudc", model.resourceId());
- Assertions.assertEquals("snhsjcnyejhkryh", model.connectionString());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LinkNotificationHubParameters model =
- new LinkNotificationHubParameters().withResourceId("tfwvukxgaudc").withConnectionString("snhsjcnyejhkryh");
- model = BinaryData.fromObject(model).toObject(LinkNotificationHubParameters.class);
- Assertions.assertEquals("tfwvukxgaudc", model.resourceId());
- Assertions.assertEquals("snhsjcnyejhkryh", model.connectionString());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkedNotificationHubInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkedNotificationHubInnerTests.java
deleted file mode 100644
index 20918d598ef13..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/LinkedNotificationHubInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.LinkedNotificationHubInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class LinkedNotificationHubInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LinkedNotificationHubInner model =
- BinaryData.fromString("{\"resourceId\":\"apcz\"}").toObject(LinkedNotificationHubInner.class);
- Assertions.assertEquals("apcz", model.resourceId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LinkedNotificationHubInner model = new LinkedNotificationHubInner().withResourceId("apcz");
- model = BinaryData.fromObject(model).toObject(LinkedNotificationHubInner.class);
- Assertions.assertEquals("apcz", model.resourceId());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/NameAvailabilityParametersTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/NameAvailabilityParametersTests.java
deleted file mode 100644
index 52a79ebf0d4b3..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/NameAvailabilityParametersTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.NameAvailabilityParameters;
-import org.junit.jupiter.api.Assertions;
-
-public final class NameAvailabilityParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NameAvailabilityParameters model =
- BinaryData.fromString("{\"name\":\"a\",\"type\":\"th\"}").toObject(NameAvailabilityParameters.class);
- Assertions.assertEquals("a", model.name());
- Assertions.assertEquals("th", model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NameAvailabilityParameters model = new NameAvailabilityParameters().withName("a").withType("th");
- model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class);
- Assertions.assertEquals("a", model.name());
- Assertions.assertEquals("th", model.type());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationDisplayTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationDisplayTests.java
deleted file mode 100644
index 78298ba9baf19..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationDisplayTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.OperationDisplay;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}")
- .toObject(OperationDisplay.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model = new OperationDisplay();
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationInnerTests.java
deleted file mode 100644
index cde031729811b..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationInnerTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.OperationInner;
-import com.azure.resourcemanager.communication.models.OperationDisplay;
-
-public final class OperationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationInner model =
- BinaryData
- .fromString(
- "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}")
- .toObject(OperationInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationInner model = new OperationInner().withDisplay(new OperationDisplay());
- model = BinaryData.fromObject(model).toObject(OperationInner.class);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationListResultTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationListResultTests.java
deleted file mode 100644
index ffca28052f32d..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.OperationListResult;
-
-public final class OperationListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}")
- .toObject(OperationListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResult model = new OperationListResult();
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationsListMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationsListMockTests.java
deleted file mode 100644
index 5b7abe6d78dc5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/OperationsListMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.Operation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"name\":\"ur\",\"isDataAction\":true,\"display\":{\"provider\":\"nspydptkoenkoukn\",\"resource\":\"dwtiukbldngkp\",\"operation\":\"ipazyxoegukgjnpi\",\"description\":\"gygev\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamePropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamePropertiesTests.java
deleted file mode 100644
index b105fc3d4bebc..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamePropertiesTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.SenderUsernameProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class SenderUsernamePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SenderUsernameProperties model =
- BinaryData
- .fromString(
- "{\"dataLocation\":\"th\",\"username\":\"vmezy\",\"displayName\":\"hxmzsbbzoggig\",\"provisioningState\":\"Failed\"}")
- .toObject(SenderUsernameProperties.class);
- Assertions.assertEquals("vmezy", model.username());
- Assertions.assertEquals("hxmzsbbzoggig", model.displayName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SenderUsernameProperties model =
- new SenderUsernameProperties().withUsername("vmezy").withDisplayName("hxmzsbbzoggig");
- model = BinaryData.fromObject(model).toObject(SenderUsernameProperties.class);
- Assertions.assertEquals("vmezy", model.username());
- Assertions.assertEquals("hxmzsbbzoggig", model.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceCollectionTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceCollectionTests.java
deleted file mode 100644
index c7b7f6385d930..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceCollectionTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.SenderUsernameResourceInner;
-import com.azure.resourcemanager.communication.models.SenderUsernameResourceCollection;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SenderUsernameResourceCollectionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SenderUsernameResourceCollection model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"dataLocation\":\"vvdfwatkpnpul\",\"username\":\"xxbczwtr\",\"displayName\":\"iqzbq\",\"provisioningState\":\"Running\"},\"id\":\"vmyokacspkwl\",\"name\":\"zdobpxjmflbvvnch\",\"type\":\"kcciwwzjuqkhr\"}],\"nextLink\":\"jiwkuofoskghsau\"}")
- .toObject(SenderUsernameResourceCollection.class);
- Assertions.assertEquals("xxbczwtr", model.value().get(0).username());
- Assertions.assertEquals("iqzbq", model.value().get(0).displayName());
- Assertions.assertEquals("jiwkuofoskghsau", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SenderUsernameResourceCollection model =
- new SenderUsernameResourceCollection()
- .withValue(
- Arrays.asList(new SenderUsernameResourceInner().withUsername("xxbczwtr").withDisplayName("iqzbq")))
- .withNextLink("jiwkuofoskghsau");
- model = BinaryData.fromObject(model).toObject(SenderUsernameResourceCollection.class);
- Assertions.assertEquals("xxbczwtr", model.value().get(0).username());
- Assertions.assertEquals("iqzbq", model.value().get(0).displayName());
- Assertions.assertEquals("jiwkuofoskghsau", model.nextLink());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceInnerTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceInnerTests.java
deleted file mode 100644
index 99bef902b3711..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernameResourceInnerTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.SenderUsernameResourceInner;
-import org.junit.jupiter.api.Assertions;
-
-public final class SenderUsernameResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SenderUsernameResourceInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"dataLocation\":\"jmvxie\",\"username\":\"uugidyjrrfby\",\"displayName\":\"svexcsonpclhoco\",\"provisioningState\":\"Running\"},\"id\":\"ev\",\"name\":\"eggzfb\",\"type\":\"hfmvfaxkffe\"}")
- .toObject(SenderUsernameResourceInner.class);
- Assertions.assertEquals("uugidyjrrfby", model.username());
- Assertions.assertEquals("svexcsonpclhoco", model.displayName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SenderUsernameResourceInner model =
- new SenderUsernameResourceInner().withUsername("uugidyjrrfby").withDisplayName("svexcsonpclhoco");
- model = BinaryData.fromObject(model).toObject(SenderUsernameResourceInner.class);
- Assertions.assertEquals("uugidyjrrfby", model.username());
- Assertions.assertEquals("svexcsonpclhoco", model.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index 212a09c80dbcb..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesCreateOrUpdateWithResponseMockTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.SenderUsernameResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class SenderUsernamesCreateOrUpdateWithResponseMockTests {
- @Test
- public void testCreateOrUpdateWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"dataLocation\":\"mpaxmodfvuefywsb\",\"username\":\"fvmwy\",\"displayName\":\"fouyf\",\"provisioningState\":\"Updating\"},\"id\":\"cpwi\",\"name\":\"zvqtmnubexkp\",\"type\":\"ksmond\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- SenderUsernameResource response =
- manager
- .senderUsernames()
- .define("ld")
- .withExistingDomain("pkeqdcvdrhvoo", "sotbob", "dopcjwvnh")
- .withUsername("mutwuoe")
- .withDisplayName("pkhjwni")
- .create();
-
- Assertions.assertEquals("fvmwy", response.username());
- Assertions.assertEquals("fouyf", response.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteWithResponseMockTests.java
deleted file mode 100644
index 78bfab1f04d7f..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesDeleteWithResponseMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class SenderUsernamesDeleteWithResponseMockTests {
- @Test
- public void testDeleteWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .senderUsernames()
- .deleteWithResponse("rwdmhdlxyjrxsa", "afcnih", "wqapnedgfbcvk", "vq", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetWithResponseMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetWithResponseMockTests.java
deleted file mode 100644
index a30ca5a30f8f5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesGetWithResponseMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.SenderUsernameResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class SenderUsernamesGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"dataLocation\":\"sdyhtozfikdowwq\",\"username\":\"uvxzxclvi\",\"displayName\":\"hqzonosggbhcoh\",\"provisioningState\":\"Deleting\"},\"id\":\"jnkaljutiiswacff\",\"name\":\"dkzzewkfvhqcrail\",\"type\":\"pnppfuf\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- SenderUsernameResource response =
- manager
- .senderUsernames()
- .getWithResponse("vpbttd", "morppxebmnzbtbh", "pglkf", "ohdneuel", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("uvxzxclvi", response.username());
- Assertions.assertEquals("hqzonosggbhcoh", response.displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsMockTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsMockTests.java
deleted file mode 100644
index 372cb44685eee..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/SenderUsernamesListByDomainsMockTests.java
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.communication.CommunicationManager;
-import com.azure.resourcemanager.communication.models.SenderUsernameResource;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class SenderUsernamesListByDomainsMockTests {
- @Test
- public void testListByDomains() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"dataLocation\":\"xndlkzgxhu\",\"username\":\"iplbpodxunkbebxm\",\"displayName\":\"yyntwl\",\"provisioningState\":\"Succeeded\"},\"id\":\"koievseo\",\"name\":\"gqrlltmuwla\",\"type\":\"wzizxbmpgcjefuzm\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- CommunicationManager manager =
- CommunicationManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager
- .senderUsernames()
- .listByDomains("mhhv", "gureodkwobdag", "tibqdxbxwakb", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("iplbpodxunkbebxm", response.iterator().next().username());
- Assertions.assertEquals("yyntwl", response.iterator().next().displayName());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/TaggedResourceTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/TaggedResourceTests.java
deleted file mode 100644
index c83aa9fb86ca5..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/TaggedResourceTests.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.TaggedResource;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class TaggedResourceTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- TaggedResource model =
- BinaryData.fromString("{\"tags\":{\"fpfpsalgbquxigj\":\"xppbhtqqro\"}}").toObject(TaggedResource.class);
- Assertions.assertEquals("xppbhtqqro", model.tags().get("fpfpsalgbquxigj"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- TaggedResource model = new TaggedResource().withTags(mapOf("fpfpsalgbquxigj", "xppbhtqqro"));
- model = BinaryData.fromObject(model).toObject(TaggedResource.class);
- Assertions.assertEquals("xppbhtqqro", model.tags().get("fpfpsalgbquxigj"));
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainPropertiesTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainPropertiesTests.java
deleted file mode 100644
index 0ce9d62a6471b..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainPropertiesTests.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.fluent.models.UpdateDomainProperties;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import org.junit.jupiter.api.Assertions;
-
-public final class UpdateDomainPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UpdateDomainProperties model =
- BinaryData.fromString("{\"userEngagementTracking\":\"Disabled\"}").toObject(UpdateDomainProperties.class);
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UpdateDomainProperties model =
- new UpdateDomainProperties().withUserEngagementTracking(UserEngagementTracking.DISABLED);
- model = BinaryData.fromObject(model).toObject(UpdateDomainProperties.class);
- Assertions.assertEquals(UserEngagementTracking.DISABLED, model.userEngagementTracking());
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainRequestParametersTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainRequestParametersTests.java
deleted file mode 100644
index 997de43474978..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/UpdateDomainRequestParametersTests.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.UpdateDomainRequestParameters;
-import com.azure.resourcemanager.communication.models.UserEngagementTracking;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class UpdateDomainRequestParametersTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UpdateDomainRequestParameters model =
- BinaryData
- .fromString(
- "{\"properties\":{\"userEngagementTracking\":\"Enabled\"},\"tags\":{\"mcl\":\"jrmvdjwzrlo\",\"jctbza\":\"hijco\",\"sycbkbfk\":\"s\",\"c\":\"ukdkexxppofmxa\"}}")
- .toObject(UpdateDomainRequestParameters.class);
- Assertions.assertEquals("jrmvdjwzrlo", model.tags().get("mcl"));
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.userEngagementTracking());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UpdateDomainRequestParameters model =
- new UpdateDomainRequestParameters()
- .withTags(mapOf("mcl", "jrmvdjwzrlo", "jctbza", "hijco", "sycbkbfk", "s", "c", "ukdkexxppofmxa"))
- .withUserEngagementTracking(UserEngagementTracking.ENABLED);
- model = BinaryData.fromObject(model).toObject(UpdateDomainRequestParameters.class);
- Assertions.assertEquals("jrmvdjwzrlo", model.tags().get("mcl"));
- Assertions.assertEquals(UserEngagementTracking.ENABLED, model.userEngagementTracking());
- }
-
- @SuppressWarnings("unchecked")
- private static Map mapOf(Object... inputs) {
- Map map = new HashMap<>();
- for (int i = 0; i < inputs.length; i += 2) {
- String key = (String) inputs[i];
- T value = (T) inputs[i + 1];
- map.put(key, value);
- }
- return map;
- }
-}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/VerificationParameterTests.java b/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/VerificationParameterTests.java
deleted file mode 100644
index a50707932d476..0000000000000
--- a/sdk/communication/azure-resourcemanager-communication/src/test/java/com/azure/resourcemanager/communication/generated/VerificationParameterTests.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.communication.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.communication.models.VerificationParameter;
-import com.azure.resourcemanager.communication.models.VerificationType;
-import org.junit.jupiter.api.Assertions;
-
-public final class VerificationParameterTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- VerificationParameter model =
- BinaryData.fromString("{\"verificationType\":\"SPF\"}").toObject(VerificationParameter.class);
- Assertions.assertEquals(VerificationType.SPF, model.verificationType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- VerificationParameter model = new VerificationParameter().withVerificationType(VerificationType.SPF);
- model = BinaryData.fromObject(model).toObject(VerificationParameter.class);
- Assertions.assertEquals(VerificationType.SPF, model.verificationType());
- }
-}