diff --git a/src/test/java/org/prebid/server/it/PriceFloorsTest.java b/src/test/java/org/prebid/server/it/PriceFloorsTest.java index d18446e7834..e9ff0df5dd3 100644 --- a/src/test/java/org/prebid/server/it/PriceFloorsTest.java +++ b/src/test/java/org/prebid/server/it/PriceFloorsTest.java @@ -4,7 +4,6 @@ import io.restassured.response.Response; import io.restassured.specification.RequestSpecification; import org.json.JSONException; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.prebid.server.model.Endpoint; import org.prebid.server.util.IntegrationTestsUtil; @@ -25,7 +24,6 @@ public class PriceFloorsTest extends IntegrationTest { private static final int APP_PORT = 8050; - private static final int WIREMOCK_PORT = 8090; private static final String PRICE_FLOORS = "Price Floors Test"; private static final String FLOORS_FROM_REQUEST = "Floors from request"; @@ -33,14 +31,6 @@ public class PriceFloorsTest extends IntegrationTest { private static final RequestSpecification SPEC = IntegrationTest.spec(APP_PORT); - @BeforeAll - public static void setUpJunk() throws IOException { - WIRE_MOCK_RULE.stubFor(get(urlPathEqualTo("/periodic-update")) - .willReturn(aResponse().withBody(jsonFrom("storedrequests/test-periodic-refresh.json")))); - WIRE_MOCK_RULE.stubFor(get(urlPathEqualTo("/currency-rates")) - .willReturn(aResponse().withBody(jsonFrom("currency/latest.json")))); - } - @Test public void openrtb2AuctionShouldApplyPriceFloorsForTheGenericBidder() throws IOException, JSONException { // given @@ -61,11 +51,10 @@ public void openrtb2AuctionShouldApplyPriceFloorsForTheGenericBidder() throws IO SPEC); // then - IntegrationTestsUtil.assertJsonEquals( + assertJsonEquals( "openrtb2/floors/floors-test-auction-response.json", firstResponse, - singletonList("generic"), - PriceFloorsTest::replaceBidderRelatedStaticInfo); + singletonList("generic")); // given final StubMapping stubMapping = WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/generic-exchange")) @@ -83,11 +72,10 @@ public void openrtb2AuctionShouldApplyPriceFloorsForTheGenericBidder() throws IO // then assertThat(stubMapping.getNewScenarioState()).isEqualTo(FLOORS_FROM_PROVIDER); - IntegrationTestsUtil.assertJsonEquals( + assertJsonEquals( "openrtb2/floors/floors-test-auction-response.json", secondResponse, - singletonList("generic"), - PriceFloorsTest::replaceBidderRelatedStaticInfo); + singletonList("generic")); } @Test @@ -105,14 +93,9 @@ public void openrtb2AuctionShouldSkipPriceFloorsForTheGenericBidderWhenGenericIs SPEC); // then - IntegrationTestsUtil.assertJsonEquals( + assertJsonEquals( "openrtb2/floors/floors-test-auction-response-no-signal.json", firstResponse, - singletonList("generic"), - PriceFloorsTest::replaceBidderRelatedStaticInfo); - } - - private static String replaceBidderRelatedStaticInfo(String json, String bidder) { - return IntegrationTestsUtil.replaceBidderRelatedStaticInfo(json, bidder, WIREMOCK_PORT); + singletonList("generic")); } }