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

public final class SensorIntegrationTests {
    @Test
    public void testDeserialize() {
        SensorIntegration model =
            BinaryData
                .fromString("{\"enabled\":\"vkmijcmmxdcuf\",\"provisioningState\":\"Deleting\"}")
                .toObject(SensorIntegration.class);
        Assertions.assertEquals("vkmijcmmxdcuf", model.enabled());
    }

    @Test
    public void testSerialize() {
        SensorIntegration model = new SensorIntegration().withEnabled("vkmijcmmxdcuf");
        model = BinaryData.fromObject(model).toObject(SensorIntegration.class);
        Assertions.assertEquals("vkmijcmmxdcuf", model.enabled());
    }
}
