diff --git a/src/main/java/org/prebid/server/bidder/verizonmedia/VerizonmediaBidder.java b/src/main/java/org/prebid/server/bidder/yahoossp/YahooSSPBidder.java similarity index 84% rename from src/main/java/org/prebid/server/bidder/verizonmedia/VerizonmediaBidder.java rename to src/main/java/org/prebid/server/bidder/yahoossp/YahooSSPBidder.java index cf8c6a19e51..75d086b731a 100644 --- a/src/main/java/org/prebid/server/bidder/verizonmedia/VerizonmediaBidder.java +++ b/src/main/java/org/prebid/server/bidder/yahoossp/YahooSSPBidder.java @@ -1,4 +1,4 @@ -package org.prebid.server.bidder.verizonmedia; +package org.prebid.server.bidder.yahoossp; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.node.ObjectNode; @@ -25,7 +25,7 @@ import org.prebid.server.json.DecodeException; import org.prebid.server.json.JacksonMapper; import org.prebid.server.proto.openrtb.ext.ExtPrebid; -import org.prebid.server.proto.openrtb.ext.request.verizonmedia.ExtImpVerizonmedia; +import org.prebid.server.proto.openrtb.ext.request.yahoossp.ExtImpYahooSSP; import org.prebid.server.proto.openrtb.ext.response.BidType; import org.prebid.server.util.HttpUtil; @@ -36,16 +36,16 @@ import java.util.Objects; import java.util.stream.Collectors; -public class VerizonmediaBidder implements Bidder { +public class YahooSSPBidder implements Bidder { - private static final TypeReference> VERIZON_EXT_TYPE_REFERENCE = - new TypeReference>() { + private static final TypeReference> YAHOOSSP_EXT_TYPE_REFERENCE = + new TypeReference>() { }; private final String endpointUrl; private final JacksonMapper mapper; - public VerizonmediaBidder(String endpointUrl, JacksonMapper mapper) { + public YahooSSPBidder(String endpointUrl, JacksonMapper mapper) { this.endpointUrl = HttpUtil.validateUrl(Objects.requireNonNull(endpointUrl)); this.mapper = Objects.requireNonNull(mapper); } @@ -59,8 +59,8 @@ public Result>> makeHttpRequests(BidRequest bidRequ for (int i = 0; i < impList.size(); i++) { try { final Imp imp = impList.get(i); - final ExtImpVerizonmedia extImpVerizonmedia = parseAndValidateImpExt(imp.getExt(), i); - final BidRequest modifiedRequest = modifyRequest(bidRequest, imp, extImpVerizonmedia); + final ExtImpYahooSSP extImpYahooSSP = parseAndValidateImpExt(imp.getExt(), i); + final BidRequest modifiedRequest = modifyRequest(bidRequest, imp, extImpYahooSSP); bidRequests.add(makeHttpRequest(modifiedRequest)); } catch (PreBidException e) { errors.add(BidderError.badInput(e.getMessage())); @@ -70,28 +70,28 @@ public Result>> makeHttpRequests(BidRequest bidRequ return Result.of(bidRequests, errors); } - private ExtImpVerizonmedia parseAndValidateImpExt(ObjectNode impExtNode, int index) { - final ExtImpVerizonmedia extImpVerizonmedia; + private ExtImpYahooSSP parseAndValidateImpExt(ObjectNode impExtNode, int index) { + final ExtImpYahooSSP extImpYahooSSP; try { - extImpVerizonmedia = mapper.mapper().convertValue(impExtNode, VERIZON_EXT_TYPE_REFERENCE).getBidder(); + extImpYahooSSP = mapper.mapper().convertValue(impExtNode, YAHOOSSP_EXT_TYPE_REFERENCE).getBidder(); } catch (IllegalArgumentException e) { throw new PreBidException(String.format("imp #%s: %s", index, e.getMessage())); } - final String dcn = extImpVerizonmedia.getDcn(); + final String dcn = extImpYahooSSP.getDcn(); if (StringUtils.isBlank(dcn)) { throw new PreBidException(String.format("imp #%s: missing param dcn", index)); } - final String pos = extImpVerizonmedia.getPos(); + final String pos = extImpYahooSSP.getPos(); if (StringUtils.isBlank(pos)) { throw new PreBidException(String.format("imp #%s: missing param pos", index)); } - return extImpVerizonmedia; + return extImpYahooSSP; } - private static BidRequest modifyRequest(BidRequest request, Imp imp, ExtImpVerizonmedia extImpVerizonmedia) { + private static BidRequest modifyRequest(BidRequest request, Imp imp, ExtImpYahooSSP extImpYahooSSP) { final Banner banner = imp.getBanner(); final boolean hasBanner = banner != null; @@ -105,7 +105,7 @@ private static BidRequest modifyRequest(BidRequest request, Imp imp, ExtImpVeriz } final Imp.ImpBuilder impBuilder = imp.toBuilder() - .tagid(extImpVerizonmedia.getPos()); + .tagid(extImpYahooSSP.getPos()); if (hasBanner && !hasBannerWidthAndHeight) { impBuilder.banner(modifyBanner(banner)); @@ -116,9 +116,9 @@ private static BidRequest modifyRequest(BidRequest request, Imp imp, ExtImpVeriz final Site site = request.getSite(); final App app = request.getApp(); if (site != null) { - requestBuilder.site(site.toBuilder().id(extImpVerizonmedia.getDcn()).build()); + requestBuilder.site(site.toBuilder().id(extImpYahooSSP.getDcn()).build()); } else if (app != null) { - requestBuilder.app(app.toBuilder().id(extImpVerizonmedia.getDcn()).build()); + requestBuilder.app(app.toBuilder().id(extImpYahooSSP.getDcn()).build()); } return requestBuilder diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/request/verizonmedia/ExtImpVerizonmedia.java b/src/main/java/org/prebid/server/proto/openrtb/ext/request/verizonmedia/ExtImpVerizonmedia.java deleted file mode 100644 index 5eb2720c714..00000000000 --- a/src/main/java/org/prebid/server/proto/openrtb/ext/request/verizonmedia/ExtImpVerizonmedia.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.prebid.server.proto.openrtb.ext.request.verizonmedia; - -import lombok.AllArgsConstructor; -import lombok.Value; - -/** - * Defines the contract for bidRequest.imp[i].ext.verizonmedia - */ -@AllArgsConstructor(staticName = "of") -@Value -public class ExtImpVerizonmedia { - - String dcn; - - String pos; -} diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/request/yahoossp/ExtImpYahooSSP.java b/src/main/java/org/prebid/server/proto/openrtb/ext/request/yahoossp/ExtImpYahooSSP.java new file mode 100644 index 00000000000..1319d0b0afc --- /dev/null +++ b/src/main/java/org/prebid/server/proto/openrtb/ext/request/yahoossp/ExtImpYahooSSP.java @@ -0,0 +1,16 @@ +package org.prebid.server.proto.openrtb.ext.request.yahoossp; + +import lombok.AllArgsConstructor; +import lombok.Value; + +/** + * Defines the contract for bidRequest.imp[i].ext.yahoossp + */ +@AllArgsConstructor(staticName = "of") +@Value +public class ExtImpYahooSSP { + + String dcn; + + String pos; +} diff --git a/src/main/java/org/prebid/server/spring/config/bidder/VerizonmediaConfiguration.java b/src/main/java/org/prebid/server/spring/config/bidder/YahooSSPConfiguration.java similarity index 71% rename from src/main/java/org/prebid/server/spring/config/bidder/VerizonmediaConfiguration.java rename to src/main/java/org/prebid/server/spring/config/bidder/YahooSSPConfiguration.java index 0d9ff349da6..520665dec82 100644 --- a/src/main/java/org/prebid/server/spring/config/bidder/VerizonmediaConfiguration.java +++ b/src/main/java/org/prebid/server/spring/config/bidder/YahooSSPConfiguration.java @@ -1,7 +1,7 @@ package org.prebid.server.spring.config.bidder; import org.prebid.server.bidder.BidderDeps; -import org.prebid.server.bidder.verizonmedia.VerizonmediaBidder; +import org.prebid.server.bidder.yahoossp.YahooSSPBidder; import org.prebid.server.json.JacksonMapper; import org.prebid.server.spring.config.bidder.model.BidderConfigurationProperties; import org.prebid.server.spring.config.bidder.util.BidderDepsAssembler; @@ -18,10 +18,10 @@ import javax.validation.constraints.NotBlank; @Configuration -@PropertySource(value = "classpath:/bidder-config/verizonmedia.yaml", factory = YamlPropertySourceFactory.class) -public class VerizonmediaConfiguration { +@PropertySource(value = "classpath:/bidder-config/yahoossp.yaml", factory = YamlPropertySourceFactory.class) +public class YahooSSPConfiguration { - private static final String BIDDER_NAME = "verizonmedia"; + private static final String BIDDER_NAME = "yahoossp"; @Value("${external-url}") @NotBlank @@ -31,21 +31,21 @@ public class VerizonmediaConfiguration { private JacksonMapper mapper; @Autowired - @Qualifier("verizonmediaConfigurationProperties") + @Qualifier("yahooSSPConfigurationProperties") private BidderConfigurationProperties configProperties; - @Bean("verizonmediaConfigurationProperties") - @ConfigurationProperties("adapters.verizonmedia") + @Bean("yahooSSPConfigurationProperties") + @ConfigurationProperties("adapters.yahoossp") BidderConfigurationProperties configurationProperties() { return new BidderConfigurationProperties(); } @Bean - BidderDeps verizonmediaBidderDeps() { + BidderDeps yahooSSPBidderDeps() { return BidderDepsAssembler.forBidder(BIDDER_NAME) .withConfig(configProperties) .usersyncerCreator(UsersyncerCreator.create(externalUrl)) - .bidderCreator(config -> new VerizonmediaBidder(config.getEndpoint(), mapper)) + .bidderCreator(config -> new YahooSSPBidder(config.getEndpoint(), mapper)) .assemble(); } } diff --git a/src/main/resources/bidder-config/verizonmedia.yaml b/src/main/resources/bidder-config/yahoossp.yaml similarity index 81% rename from src/main/resources/bidder-config/verizonmedia.yaml rename to src/main/resources/bidder-config/yahoossp.yaml index 6f5be2c81a1..b443f1f7de7 100644 --- a/src/main/resources/bidder-config/verizonmedia.yaml +++ b/src/main/resources/bidder-config/yahoossp.yaml @@ -1,12 +1,16 @@ adapters: - verizonmedia: + yahoossp: enabled: false endpoint: https://s2shb.ssp.yahoo.com/admax/bid/partners/MAG pbs-enforces-gdpr: true pbs-enforces-ccpa: true modifying-vast-xml-allowed: true deprecated-names: - aliases: {} + aliases: + verizonmedia: + enabled: false + yssp: + enabled: false meta-info: maintainer-email: dsp-supply-prebid@verizonmedia.com app-media-types: @@ -18,6 +22,6 @@ adapters: usersync: url: https://ups.analytics.yahoo.com/ups/58401/sync?redir=true&gdpr={{gdpr}}&gdpr_consent={{gdpr_consent}} redirect-url: - cookie-family-name: verizonmedia + cookie-family-name: yahoossp type: redirect support-cors: false diff --git a/src/main/resources/static/bidder-params/verizonmedia.json b/src/main/resources/static/bidder-params/yahoossp.json similarity index 84% rename from src/main/resources/static/bidder-params/verizonmedia.json rename to src/main/resources/static/bidder-params/yahoossp.json index fdcbe887249..0044f8d1c7c 100644 --- a/src/main/resources/static/bidder-params/verizonmedia.json +++ b/src/main/resources/static/bidder-params/yahoossp.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "VerizonMedia Adapter Params", - "description": "A schema which validates params accepted by the VerizonMedia adapter", + "title": "YahooSSP Adapter Params", + "description": "A schema which validates params accepted by the YahooSSP adapter", "type": "object", "properties": { "dcn": { @@ -17,4 +17,4 @@ "dcn", "pos" ] -} \ No newline at end of file +} diff --git a/src/test/java/org/prebid/server/bidder/verizonmedia/VerizonmediaBidderTest.java b/src/test/java/org/prebid/server/bidder/yahoossp/YahooSSPBidderTest.java similarity index 85% rename from src/test/java/org/prebid/server/bidder/verizonmedia/VerizonmediaBidderTest.java rename to src/test/java/org/prebid/server/bidder/yahoossp/YahooSSPBidderTest.java index 0342a6f11ef..f814d69502f 100644 --- a/src/test/java/org/prebid/server/bidder/verizonmedia/VerizonmediaBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/yahoossp/YahooSSPBidderTest.java @@ -1,4 +1,4 @@ -package org.prebid.server.bidder.verizonmedia; +package org.prebid.server.bidder.yahoossp; import com.fasterxml.jackson.core.JsonProcessingException; import com.iab.openrtb.request.App; @@ -21,7 +21,7 @@ import org.prebid.server.bidder.model.HttpResponse; import org.prebid.server.bidder.model.Result; import org.prebid.server.proto.openrtb.ext.ExtPrebid; -import org.prebid.server.proto.openrtb.ext.request.verizonmedia.ExtImpVerizonmedia; +import org.prebid.server.proto.openrtb.ext.request.yahoossp.ExtImpYahooSSP; import java.util.List; import java.util.Map; @@ -36,20 +36,20 @@ import static org.assertj.core.api.Assertions.tuple; import static org.prebid.server.proto.openrtb.ext.response.BidType.banner; -public class VerizonmediaBidderTest extends VertxTest { +public class YahooSSPBidderTest extends VertxTest { private static final String ENDPOINT_URL = "https://test.endpoint.com"; - private VerizonmediaBidder verizonmediaBidder; + private YahooSSPBidder yahooSSPBidder; @Before public void setUp() { - verizonmediaBidder = new VerizonmediaBidder(ENDPOINT_URL, jacksonMapper); + yahooSSPBidder = new YahooSSPBidder(ENDPOINT_URL, jacksonMapper); } @Test public void creationShouldFailOnInvalidEndpointUrl() { - assertThatIllegalArgumentException().isThrownBy(() -> new VerizonmediaBidder("invalid_url", jacksonMapper)); + assertThatIllegalArgumentException().isThrownBy(() -> new YahooSSPBidder("invalid_url", jacksonMapper)); } @Test @@ -61,7 +61,7 @@ public void makeHttpRequestsShouldReturnErrorIfImpExtCouldNotBeParsed() { identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).hasSize(1); @@ -74,11 +74,11 @@ public void makeHttpRequestsShouldReturnErrorWhenDcnIsEmpty() { // given final BidRequest bidRequest = givenBidRequest( impBuilder -> impBuilder - .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpVerizonmedia.of("", null)))), + .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpYahooSSP.of("", null)))), identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).hasSize(1) @@ -91,11 +91,11 @@ public void makeHttpRequestsShouldReturnErrorWhenPosIsEmpty() { // given final BidRequest bidRequest = givenBidRequest( impBuilder -> impBuilder - .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpVerizonmedia.of("dcn", "")))), + .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpYahooSSP.of("dcn", "")))), identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).hasSize(1) @@ -110,12 +110,12 @@ public void makeHttpRequestsShouldCreateARequestForEachImpAndSkipImpsWithErrors( .imp(asList( givenImp(impBuilder -> impBuilder.id("imp1")), givenImp(impBuilder -> impBuilder.id("imp2") - .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpVerizonmedia.of("dcn", ""))))), + .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpYahooSSP.of("dcn", ""))))), givenImp(impBuilder -> impBuilder.id("imp3")))) .build(); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).hasSize(1) @@ -133,7 +133,7 @@ public void makeHttpRequestsShouldAlwaysSetImpTagIdFromImpExt() { final BidRequest bidRequest = givenBidRequest(identity(), identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).isEmpty(); @@ -150,7 +150,7 @@ public void makeHttpRequestsShouldSetSiteIdIfSiteIsPresentInTheRequest() { final BidRequest bidRequest = givenBidRequest(identity(), identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).isEmpty(); @@ -168,7 +168,7 @@ public void makeHttpRequestsShouldSetAppIdIfAppIsPresentInTheRequest() { bidRequestBuilder -> bidRequestBuilder.site(null).app(App.builder().build())); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).isEmpty(); @@ -187,7 +187,7 @@ public void makeHttpRequestsShouldReturnErrorWhenBannerWidthIsZero() { identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getValue()).isEmpty(); @@ -203,7 +203,7 @@ public void makeHttpRequestsShouldReturnErrorWhenBannerHeightIsZero() { identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getValue()).isEmpty(); @@ -219,7 +219,7 @@ public void makeHttpRequestsShouldReturnErrorWhenBannerHasNoFormats() { identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getValue()).isEmpty(); @@ -235,7 +235,7 @@ public void makeHttpRequestsSetFirstImpressionBannerWidthAndHeightWhenFromFirstF identity()); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).isEmpty(); @@ -254,7 +254,7 @@ public void makeHttpRequestsShouldSetExpectedHeaders() { requestBuilder -> requestBuilder.site(null).device(Device.builder().ua("UA").build())); // when - final Result>> result = verizonmediaBidder.makeHttpRequests(bidRequest); + final Result>> result = yahooSSPBidder.makeHttpRequests(bidRequest); // then assertThat(result.getErrors()).isEmpty(); @@ -272,7 +272,7 @@ public void makeBidsShouldReturnErrorIfResponseBodyCouldNotBeParsed() { final HttpCall httpCall = givenHttpCall(null, "invalid"); // when - final Result> result = verizonmediaBidder.makeBids(httpCall, null); + final Result> result = yahooSSPBidder.makeBids(httpCall, null); // then assertThat(result.getErrors()).hasSize(1); @@ -288,7 +288,7 @@ public void makeBidsShouldReturnEmptyListIfBidResponseIsNull() throws JsonProces mapper.writeValueAsString(null)); // when - final Result> result = verizonmediaBidder.makeBids(httpCall, null); + final Result> result = yahooSSPBidder.makeBids(httpCall, null); // then assertThat(result.getErrors()).isEmpty(); @@ -302,7 +302,7 @@ public void makeBidsShouldReturnEmptyListIfBidResponseSeatBidIsNull() throws Jso mapper.writeValueAsString(BidResponse.builder().build())); // when - final Result> result = verizonmediaBidder.makeBids(httpCall, null); + final Result> result = yahooSSPBidder.makeBids(httpCall, null); // then assertThat(result.getErrors()).isEmpty(); @@ -316,7 +316,7 @@ public void makeBidsShouldReturnErrorIfBidResponseSeatBidIsEmpty() throws JsonPr mapper.writeValueAsString(BidResponse.builder().seatbid(emptyList()).build())); // when - final Result> result = verizonmediaBidder.makeBids(httpCall, null); + final Result> result = yahooSSPBidder.makeBids(httpCall, null); // then assertThat(result.getErrors()).hasSize(1) @@ -337,7 +337,7 @@ public void makeBidsShouldReturnErrorWhenBidImpIdIsNotPresent() throws JsonProce givenBidResponse(bidBuilder -> bidBuilder.impid("321")))); // when - final Result> result = verizonmediaBidder.makeBids(httpCall, null); + final Result> result = yahooSSPBidder.makeBids(httpCall, null); // then assertThat(result.getErrors()).hasSize(1) @@ -362,7 +362,7 @@ public void makeBidsShouldSkipNotBannerImpAndReturnBannerBidWhenBannerPresent() .build())); // when - final Result> result = verizonmediaBidder.makeBids(httpCall, null); + final Result> result = yahooSSPBidder.makeBids(httpCall, null); // then assertThat(result.getErrors()).isEmpty(); @@ -383,7 +383,7 @@ private static Imp givenImp(Function impCustomiz return impCustomizer.apply(Imp.builder() .tagid("tagId") .banner(Banner.builder().w(100).h(100).build()) - .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpVerizonmedia.of("dcn", "pos"))))) + .ext(mapper.valueToTree(ExtPrebid.of(null, ExtImpYahooSSP.of("dcn", "pos"))))) .build(); } diff --git a/src/test/java/org/prebid/server/cookie/UidsCookieServiceTest.java b/src/test/java/org/prebid/server/cookie/UidsCookieServiceTest.java index a8543f2e43f..c1c36d69160 100644 --- a/src/test/java/org/prebid/server/cookie/UidsCookieServiceTest.java +++ b/src/test/java/org/prebid/server/cookie/UidsCookieServiceTest.java @@ -280,7 +280,7 @@ public void toCookieShouldEnforceMaxCookieSizeAndRemoveAUidWithCloserExpirationD .updateUid("sharethrough", "sharethroughUid") .updateUid("improvedigital", "improvedigitalUid") .updateUid("somoaudience", "somoaudienceUid") - .updateUid("verizonmedia", "verizonmediaUid"); + .updateUid("yahoossp", "yahoosspUid"); // the size of uidsCookie above is 530, therefore it is expected to be modified. final int maxCookieSizeBytes = 500; diff --git a/src/test/java/org/prebid/server/it/VerizonmediaTest.java b/src/test/java/org/prebid/server/it/YahooSSPTest.java similarity index 55% rename from src/test/java/org/prebid/server/it/VerizonmediaTest.java rename to src/test/java/org/prebid/server/it/YahooSSPTest.java index 3ecd3073b4e..cfafd2819b0 100644 --- a/src/test/java/org/prebid/server/it/VerizonmediaTest.java +++ b/src/test/java/org/prebid/server/it/YahooSSPTest.java @@ -16,23 +16,23 @@ import static java.util.Collections.singletonList; @RunWith(SpringRunner.class) -public class VerizonmediaTest extends IntegrationTest { +public class YahooSSPTest extends IntegrationTest { @Test - public void openrtb2AuctionShouldRespondWithBidsFromVerizonmedia() throws IOException, JSONException { + public void openrtb2AuctionShouldRespondWithBidsFromYahooSSP() throws IOException, JSONException { // given - WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/verizonmedia-exchange")) + WIRE_MOCK_RULE.stubFor(post(urlPathEqualTo("/yahoossp-exchange")) .withRequestBody(equalToJson( - jsonFrom("openrtb2/verizonmedia/test-verizonmedia-bid-request.json"))) + jsonFrom("openrtb2/yahoossp/test-yahoossp-bid-request.json"))) .willReturn(aResponse().withBody( - jsonFrom("openrtb2/verizonmedia/test-verizonmedia-bid-response.json")))); + jsonFrom("openrtb2/yahoossp/test-yahoossp-bid-response.json")))); // when - final Response response = responseFor("openrtb2/verizonmedia/test-auction-verizonmedia-request.json", + final Response response = responseFor("openrtb2/yahoossp/test-auction-yahoossp-request.json", Endpoint.openrtb2_auction); // then - assertJsonEquals("openrtb2/verizonmedia/test-auction-verizonmedia-response.json", response, - singletonList("verizonmedia")); + assertJsonEquals("openrtb2/yahoossp/test-auction-yahoossp-response.json", response, + singletonList("yahoossp")); } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-auction-yahoossp-request.json similarity index 91% rename from src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-request.json rename to src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-auction-yahoossp-request.json index 76979ec2344..bda005345c6 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-auction-yahoossp-request.json @@ -8,7 +8,7 @@ "h": 250 }, "ext": { - "verizonmedia": { + "yahoossp": { "dcn": "dcn", "pos": "pos" } @@ -21,4 +21,4 @@ "gdpr": 0 } } -} \ No newline at end of file +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-response.json b/src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-auction-yahoossp-response.json similarity index 86% rename from src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-response.json rename to src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-auction-yahoossp-response.json index 19948abcb4a..88f585ef00b 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-auction-yahoossp-response.json @@ -19,14 +19,14 @@ } } ], - "seat": "verizonmedia", + "seat": "yahoossp", "group": 0 } ], "cur": "USD", "ext": { "responsetimemillis": { - "verizonmedia": "{{ verizonmedia.response_time_ms }}" + "yahoossp": "{{ yahoossp.response_time_ms }}" }, "prebid": { "auctiontimestamp": 0 diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-yahoossp-bid-request.json similarity index 100% rename from src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-request.json rename to src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-yahoossp-bid-request.json diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-yahoossp-bid-response.json similarity index 100% rename from src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-response.json rename to src/test/resources/org/prebid/server/it/openrtb2/yahoossp/test-yahoossp-bid-response.json diff --git a/src/test/resources/org/prebid/server/it/test-application.properties b/src/test/resources/org/prebid/server/it/test-application.properties index 2a363f1ebe8..b7a603222b7 100644 --- a/src/test/resources/org/prebid/server/it/test-application.properties +++ b/src/test/resources/org/prebid/server/it/test-application.properties @@ -229,8 +229,8 @@ adapters.unruly.enabled=true adapters.unruly.endpoint=http://localhost:8090/unruly-exchange adapters.valueimpression.enabled=true adapters.valueimpression.endpoint=http://localhost:8090/valueimpression-exchange -adapters.verizonmedia.enabled=true -adapters.verizonmedia.endpoint=http://localhost:8090/verizonmedia-exchange +adapters.yahoossp.enabled=true +adapters.yahoossp.endpoint=http://localhost:8090/yahoossp-exchange adapters.vrtcal.enabled=true adapters.vrtcal.endpoint=http://localhost:8090/vrtcal-exchange adapters.visx.enabled=true