// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.workloads.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.workloads.models.DeployerVmPackages;
import com.azure.resourcemanager.workloads.models.OsSapConfiguration;
import org.junit.jupiter.api.Assertions;

public final class OsSapConfigurationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OsSapConfiguration model =
            BinaryData
                .fromString(
                    "{\"deployerVmPackages\":{\"url\":\"scyhwz\",\"storageAccountId\":\"irujbz\"},\"sapFqdn\":\"mvzzbtdcqvp\"}")
                .toObject(OsSapConfiguration.class);
        Assertions.assertEquals("scyhwz", model.deployerVmPackages().url());
        Assertions.assertEquals("irujbz", model.deployerVmPackages().storageAccountId());
        Assertions.assertEquals("mvzzbtdcqvp", model.sapFqdn());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OsSapConfiguration model =
            new OsSapConfiguration()
                .withDeployerVmPackages(new DeployerVmPackages().withUrl("scyhwz").withStorageAccountId("irujbz"))
                .withSapFqdn("mvzzbtdcqvp");
        model = BinaryData.fromObject(model).toObject(OsSapConfiguration.class);
        Assertions.assertEquals("scyhwz", model.deployerVmPackages().url());
        Assertions.assertEquals("irujbz", model.deployerVmPackages().storageAccountId());
        Assertions.assertEquals("mvzzbtdcqvp", model.sapFqdn());
    }
}
