package io.dropwizard.testing.junit5;

import io.dropwizard.testing.app.TestApplication;
import io.dropwizard.testing.app.TestConfiguration;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import javax.ws.rs.core.Response;
import java.util.Collections;

import static io.dropwizard.testing.ResourceHelpers.resourceFilePath;
import static javax.ws.rs.core.HttpHeaders.ACCEPT_ENCODING;
import static javax.ws.rs.core.HttpHeaders.CONTENT_ENCODING;
import static javax.ws.rs.core.HttpHeaders.VARY;
import static org.assertj.core.api.Assertions.assertThat;

@ExtendWith(DropwizardExtensionsSupport.class)
class GzipDefaultVaryBehaviourTest {

    private DropwizardAppExtension<TestConfiguration> extension = new DropwizardAppExtension<>(TestApplication.class,
        resourceFilePath("gzip-vary-test-config.yaml"));

    @Test
    void testDefaultVaryHeader() {
        final Response clientResponse = extension.client().target(
            "http://localhost:" + extension.getLocalPort() + "/test").request().header(ACCEPT_ENCODING, "gzip").get();

        assertThat(clientResponse.getHeaders().get(VARY)).isEqualTo(Collections.singletonList((Object) ACCEPT_ENCODING));
        assertThat(clientResponse.getHeaders().get(CONTENT_ENCODING)).isEqualTo(Collections.singletonList((Object) "gzip"));
    }
}

@@ -682,16 +682,22 @@
 private 
+final 
 Dropwiza
@@ -1134,30 +1134,43 @@
 rs()
-.get(VARY)).isEqualTo(
+)%0A            .containsEntry(VARY, 
 Coll
@@ -1191,25 +1191,16 @@
 tonList(
-(Object) 
 ACCEPT_E
@@ -1208,17 +1208,16 @@
 CODING))
-;
 %0A       
@@ -1221,50 +1221,26 @@
     
-assertThat(clientResponse.getHeaders().get
+    .containsEntry
 (CON
@@ -1256,21 +1256,10 @@
 DING
-)).isEqualTo(
+, 
 Coll
@@ -1284,17 +1284,8 @@
 ist(
-(Object) 
 %22gzi

Make better use of AssertJ in `GzipDefaultVaryBehaviourTest`