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

package com.azure.resourcemanager.hdinsight.containers.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.containers.models.TrinoWorker;
import org.junit.jupiter.api.Assertions;

public final class TrinoWorkerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        TrinoWorker model =
            BinaryData
                .fromString("{\"debug\":{\"enable\":true,\"port\":139980296,\"suspend\":true}}")
                .toObject(TrinoWorker.class);
        Assertions.assertEquals(true, model.enable());
        Assertions.assertEquals(139980296, model.port());
        Assertions.assertEquals(true, model.suspend());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        TrinoWorker model = new TrinoWorker().withEnable(true).withPort(139980296).withSuspend(true);
        model = BinaryData.fromObject(model).toObject(TrinoWorker.class);
        Assertions.assertEquals(true, model.enable());
        Assertions.assertEquals(139980296, model.port());
        Assertions.assertEquals(true, model.suspend());
    }
}
