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

package com.azure.resourcemanager.billing.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.billing.fluent.models.BillingPermissionsPropertiesInner;
import com.azure.resourcemanager.billing.fluent.models.BillingRoleDefinitionProperties;
import java.util.Arrays;

public final class BillingRoleDefinitionPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BillingRoleDefinitionProperties model =
            BinaryData
                .fromString(
                    "{\"description\":\"crpw\",\"permissions\":[{\"actions\":[\"oi\",\"brnjwmw\",\"pn\"],\"notActions\":[\"zejjoqk\"]},{\"actions\":[\"hsxttaugzxnf\",\"azpxdtnkdmkqjjl\",\"uenvrkp\"],\"notActions\":[\"aibrebqaaysjkixq\",\"nqttezl\",\"fffiak\",\"jpqqmted\"]}],\"roleName\":\"mmji\"}")
                .toObject(BillingRoleDefinitionProperties.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        BillingRoleDefinitionProperties model =
            new BillingRoleDefinitionProperties()
                .withPermissions(
                    Arrays.asList(new BillingPermissionsPropertiesInner(), new BillingPermissionsPropertiesInner()));
        model = BinaryData.fromObject(model).toObject(BillingRoleDefinitionProperties.class);
    }
}
