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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.ApiOperationAnnotation;
import com.azure.resourcemanager.logic.models.StatusAnnotation;
import org.junit.jupiter.api.Assertions;

public final class ApiOperationAnnotationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApiOperationAnnotation model =
            BinaryData
                .fromString("{\"status\":\"NotSpecified\",\"family\":\"mqeq\",\"revision\":114942799}")
                .toObject(ApiOperationAnnotation.class);
        Assertions.assertEquals(StatusAnnotation.NOT_SPECIFIED, model.status());
        Assertions.assertEquals("mqeq", model.family());
        Assertions.assertEquals(114942799, model.revision());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApiOperationAnnotation model =
            new ApiOperationAnnotation()
                .withStatus(StatusAnnotation.NOT_SPECIFIED)
                .withFamily("mqeq")
                .withRevision(114942799);
        model = BinaryData.fromObject(model).toObject(ApiOperationAnnotation.class);
        Assertions.assertEquals(StatusAnnotation.NOT_SPECIFIED, model.status());
        Assertions.assertEquals("mqeq", model.family());
        Assertions.assertEquals(114942799, model.revision());
    }
}
