public void test_ReplaceVersion_noUid() {
Clock origClock = _exgMaster.getClock();
try {
Instant now = Instant.now();
ObjectId baseOid = setupTestData(now);
_exgMaster.setClock(Clock.fixed(now.plus(2, HOURS), ZoneOffset.UTC));
final ExternalIdBundle bundle = ExternalIdBundle.of("B", "B0");
final ExternalIdBundle region = ExternalIdBundle.of("R", "R0");
List<ExchangeDocument> replacement = newArrayList();
for (int i = 0; i <= 2; i++) {
ManageableExchange ex = new ManageableExchange(bundle, "replace_" + i, region, null);
ExchangeDocument doc = new ExchangeDocument(ex);
doc.setVersionFromInstant(now.plus(1, MINUTES).plus(i * 20, SECONDS));
replacement.add(doc);
}
_exgMaster.replaceVersion(baseOid.atVersion("no such uid"), replacement);
} finally {
_exgMaster.setClock(origClock);
}
}