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

package com.azure.resourcemanager.apimanagement.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.apimanagement.fluent.models.RecipientUserContractInner;
import org.junit.jupiter.api.Assertions;

public final class RecipientUserContractInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RecipientUserContractInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"userId\":\"robzzxezmnrkjgpj\"},\"id\":\"uxsphlokfpm\",\"name\":\"jpdvzvfbhwbdquf\",\"type\":\"cgnrglaqrwy\"}")
                .toObject(RecipientUserContractInner.class);
        Assertions.assertEquals("robzzxezmnrkjgpj", model.userId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RecipientUserContractInner model = new RecipientUserContractInner().withUserId("robzzxezmnrkjgpj");
        model = BinaryData.fromObject(model).toObject(RecipientUserContractInner.class);
        Assertions.assertEquals("robzzxezmnrkjgpj", model.userId());
    }
}
