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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.ContentLink;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters;
import org.junit.jupiter.api.Assertions;

public final class IntegrationServiceEnvironmentManagedApiDeploymentParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IntegrationServiceEnvironmentManagedApiDeploymentParameters model =
            BinaryData
                .fromString(
                    "{\"contentLinkDefinition\":{\"uri\":\"gvkzqkjjeokbze\",\"contentVersion\":\"zrxcczurt\",\"contentSize\":5192277708355571160,\"contentHash\":{\"algorithm\":\"bkwvzg\",\"value\":\"v\"},\"metadata\":\"databzdixzmq\"}}")
                .toObject(IntegrationServiceEnvironmentManagedApiDeploymentParameters.class);
        Assertions.assertEquals("gvkzqkjjeokbze", model.contentLinkDefinition().uri());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IntegrationServiceEnvironmentManagedApiDeploymentParameters model =
            new IntegrationServiceEnvironmentManagedApiDeploymentParameters()
                .withContentLinkDefinition(new ContentLink().withUri("gvkzqkjjeokbze"));
        model =
            BinaryData.fromObject(model).toObject(IntegrationServiceEnvironmentManagedApiDeploymentParameters.class);
        Assertions.assertEquals("gvkzqkjjeokbze", model.contentLinkDefinition().uri());
    }
}
