// 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.models.EndpointBaseUpdateParameters;
import com.azure.resourcemanager.storagemover.models.EndpointBaseUpdateProperties;
import org.junit.jupiter.api.Assertions;

public final class EndpointBaseUpdateParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        EndpointBaseUpdateParameters model =
            BinaryData
                .fromString("{\"properties\":{\"description\":\"kwh\"}}")
                .toObject(EndpointBaseUpdateParameters.class);
        Assertions.assertEquals("kwh", model.properties().description());
    }

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