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

package com.azure.resourcemanager.batch.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.batch.models.EnvironmentSetting;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class EnvironmentSettingTests {
    @Test
    public void testDeserialize() {
        EnvironmentSetting model =
            BinaryData
                .fromString("{\"name\":\"mypyynpcdpu\",\"value\":\"zgmwznmabikns\"}")
                .toObject(EnvironmentSetting.class);
        Assertions.assertEquals("mypyynpcdpu", model.name());
        Assertions.assertEquals("zgmwznmabikns", model.value());
    }

    @Test
    public void testSerialize() {
        EnvironmentSetting model = new EnvironmentSetting().withName("mypyynpcdpu").withValue("zgmwznmabikns");
        model = BinaryData.fromObject(model).toObject(EnvironmentSetting.class);
        Assertions.assertEquals("mypyynpcdpu", model.name());
        Assertions.assertEquals("zgmwznmabikns", model.value());
    }
}
