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

package com.azure.resourcemanager.policyinsights.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.policyinsights.models.ComplianceDetail;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ComplianceDetailTests {
    @Test
    public void testDeserialize() {
        ComplianceDetail model =
            BinaryData
                .fromString("{\"complianceState\":\"unrmfqjhhkxb\",\"count\":478088407}")
                .toObject(ComplianceDetail.class);
        Assertions.assertEquals("unrmfqjhhkxb", model.complianceState());
        Assertions.assertEquals(478088407, model.count());
    }

    @Test
    public void testSerialize() {
        ComplianceDetail model = new ComplianceDetail().withComplianceState("unrmfqjhhkxb").withCount(478088407);
        model = BinaryData.fromObject(model).toObject(ComplianceDetail.class);
        Assertions.assertEquals("unrmfqjhhkxb", model.complianceState());
        Assertions.assertEquals(478088407, model.count());
    }
}
