// 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.BillingRoleDefinitionInner;
import java.util.Arrays;

public final class BillingRoleDefinitionInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BillingRoleDefinitionInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"description\":\"afxtsgum\",\"permissions\":[{\"actions\":[],\"notActions\":[]},{\"actions\":[],\"notActions\":[]},{\"actions\":[],\"notActions\":[]}],\"roleName\":\"lo\"},\"id\":\"bq\",\"name\":\"vuzlm\",\"type\":\"felfktg\"}")
                .toObject(BillingRoleDefinitionInner.class);
    }

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