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

package tsptest.specialheaders.generated;

import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.rest.PagedIterable;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import tsptest.specialheaders.models.Resource;

@Disabled
public final class EtagHeadersListWithEtagTests extends SpecialHeadersClientTestBase {
    @Test
    @Disabled
    public void testEtagHeadersListWithEtagTests() {
        // method invocation
        PagedIterable<Resource> response = etagHeadersClient.listWithEtag();

        // response assertion
        Assertions.assertEquals(200, response.iterableByPage().iterator().next().getStatusCode());
        Assertions.assertEquals("\"64e005\"",
            response.iterableByPage().iterator().next().getHeaders().get(HttpHeaderName.fromString("ETag")).getValue());
        Resource firstItem = response.iterator().next();
        Assertions.assertNotNull(firstItem);
        // verify property "id"
        Assertions.assertEquals("myId", firstItem.getId());
        // verify property "name"
        Assertions.assertEquals("name", firstItem.getName());
        // verify property "description"
        Assertions.assertEquals("This is sample for Etag headers", firstItem.getDescription());
        // verify property "type"
        Assertions.assertEquals("myType", firstItem.getType());
    }
}
