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

package com.azure.resourcemanager.mariadb.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mariadb.fluent.models.QueryPerformanceInsightResetDataResultInner;
import com.azure.resourcemanager.mariadb.models.QueryPerformanceInsightResetDataResultState;
import org.junit.jupiter.api.Assertions;

public final class QueryPerformanceInsightResetDataResultInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        QueryPerformanceInsightResetDataResultInner model =
            BinaryData
                .fromString("{\"status\":\"Failed\",\"message\":\"zmh\"}")
                .toObject(QueryPerformanceInsightResetDataResultInner.class);
        Assertions.assertEquals(QueryPerformanceInsightResetDataResultState.FAILED, model.status());
        Assertions.assertEquals("zmh", model.message());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        QueryPerformanceInsightResetDataResultInner model =
            new QueryPerformanceInsightResetDataResultInner()
                .withStatus(QueryPerformanceInsightResetDataResultState.FAILED)
                .withMessage("zmh");
        model = BinaryData.fromObject(model).toObject(QueryPerformanceInsightResetDataResultInner.class);
        Assertions.assertEquals(QueryPerformanceInsightResetDataResultState.FAILED, model.status());
        Assertions.assertEquals("zmh", model.message());
    }
}
