// 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.ApplicationPackageReference;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ApplicationPackageReferenceTests {
    @Test
    public void testDeserialize() {
        ApplicationPackageReference model =
            BinaryData.fromString("{\"id\":\"ywggx\",\"version\":\"lla\"}").toObject(ApplicationPackageReference.class);
        Assertions.assertEquals("ywggx", model.id());
        Assertions.assertEquals("lla", model.version());
    }

    @Test
    public void testSerialize() {
        ApplicationPackageReference model = new ApplicationPackageReference().withId("ywggx").withVersion("lla");
        model = BinaryData.fromObject(model).toObject(ApplicationPackageReference.class);
        Assertions.assertEquals("ywggx", model.id());
        Assertions.assertEquals("lla", model.version());
    }
}
