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

package com.azure.resourcemanager.agrifood.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.agrifood.fluent.models.ExtensionInner;
import com.azure.resourcemanager.agrifood.models.ExtensionListResponse;
import java.util.Arrays;
import org.junit.jupiter.api.Test;

public final class ExtensionListResponseTests {
    @Test
    public void testDeserialize() {
        ExtensionListResponse model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"extensionId\":\"ifsqesaagdfmg\",\"extensionCategory\":\"lhjxr\",\"installedExtensionVersion\":\"kwm\",\"extensionAuthLink\":\"ktsizntocipaou\",\"extensionApiDocsLink\":\"psqucmpoyf\"},\"eTag\":\"fogknygjofjdde\",\"id\":\"s\",\"name\":\"deupewnwrei\",\"type\":\"jzyflu\"},{\"properties\":{\"extensionId\":\"hmofc\",\"extensionCategory\":\"smy\",\"installedExtensionVersion\":\"kdtmlxhekuk\",\"extensionAuthLink\":\"txukcdmp\",\"extensionApiDocsLink\":\"cryuan\"},\"eTag\":\"uxzdxtay\",\"id\":\"lhmwhfpmrqobm\",\"name\":\"u\",\"type\":\"knryrtihfxtij\"}],\"nextLink\":\"zvgnwzs\"}")
                .toObject(ExtensionListResponse.class);
    }

    @Test
    public void testSerialize() {
        ExtensionListResponse model =
            new ExtensionListResponse().withValue(Arrays.asList(new ExtensionInner(), new ExtensionInner()));
        model = BinaryData.fromObject(model).toObject(ExtensionListResponse.class);
    }
}
