### Question:
CriteoBidTokenController { @Nullable static synchronized BidToken takeBidToken(@Nullable AdRequest adRequest) { if (adRequest == null) { return null; } return bidTokenMap.remove(adRequest); }    }### Answer:
@Test public void takeBidToken() { BidToken bidToken1 = CriteoBidTokenController.takeBidToken(null); BidToken bidToken2 = CriteoBidTokenController.takeBidToken(createAdRequest()); assertNull(bidToken1); assertNull(bidToken2); BidToken bidToken3 = CriteoUtils.createBidToken(); AdRequest adRequest1 = createAdRequest(); CriteoBidTokenController.storeBidToken(adRequest1, bidToken3); assertEquals(bidToken3, CriteoBidTokenController.takeBidToken(adRequest1)); }