New Adapter: Nativery by przemkaczmarek · Pull Request #4223 · prebid/prebid-server-java
I can’t write:
.containsExactly(BidderBid.of(Bid.builder().impid("123").build(), video, "EUR"));
because
the production code in NativeryBidder.makeBids always overrides bid.ext, setting it to a structure like:
{
"prebid": {
"meta": {
"mediaType": ...,
"advertiserDomains": [...]
}
}
}
The expected object has ext == null, so containsExactly(...) compares the full objects and detects a difference in the bid.ext field.
To make the assertion pass, you would need to construct the expected Bid with the same ext, or narrow the assertion to only check the type.
That’s why I used:
assertThat(result.getValue())
.extracting(BidderBid::getType)
.containsExactly(BidType.banner);
(Other adapters use this approach too, for example playdigo.)