replacement.get(replacement.size() - 1).setVersionToInstant(now.plus(2, MINUTES));
ExchangeHistoryRequest historyRequest = new ExchangeHistoryRequest();
historyRequest.setObjectId(baseOid);
historyRequest.setCorrectionsFromInstant(now.plus(2, HOURS));
ExchangeHistoryResult result = _exgMaster.history(historyRequest);
List<ExchangeDocument> exchanges = result.getDocuments();
ExchangeDocument secondVersionDoc = exchanges.get(exchanges.size() - 2);
_exgMaster.replaceVersion(secondVersionDoc.getUniqueId(), replacement);
historyRequest = new ExchangeHistoryRequest();
historyRequest.setObjectId(baseOid);
historyRequest.setCorrectionsFromInstant(now.plus(2, HOURS));
result = _exgMaster.history(historyRequest);
exchanges = result.getDocuments();
assertEquals(7, exchanges.size());
assertEquals(now, exchanges.get(6).getVersionFromInstant());
assertEquals(now.plus(1, MINUTES), exchanges.get(6).getVersionToInstant());