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

package com.azure.resourcemanager.storagemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagemover.fluent.models.EndpointInner;
import com.azure.resourcemanager.storagemover.models.EndpointBaseProperties;
import org.junit.jupiter.api.Assertions;

public final class EndpointInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        EndpointInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"endpointType\":\"EndpointBaseProperties\",\"description\":\"osfln\",\"provisioningState\":\"Succeeded\"},\"id\":\"qpteeh\",\"name\":\"zvypyqrimzinp\",\"type\":\"swjdkirso\"}")
                .toObject(EndpointInner.class);
        Assertions.assertEquals("osfln", model.properties().description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        EndpointInner model = new EndpointInner().withProperties(new EndpointBaseProperties().withDescription("osfln"));
        model = BinaryData.fromObject(model).toObject(EndpointInner.class);
        Assertions.assertEquals("osfln", model.properties().description());
    }
}
