@SuppressWarnings("unchecked")
private static ExchangeSource myExchangeSource() {
final Exchange exchange = Mockito.mock(Exchange.class);
Mockito.when(exchange.getUniqueId()).thenReturn(UniqueId.of("SOMETHING", "SOMETHING ELSE"));
final ExchangeSource source = Mockito.mock(ExchangeSource.class);
Mockito.when(source.get(Mockito.any(UniqueId.class))).thenReturn(exchange);
Mockito.when(source.get(Mockito.any(ObjectId.class), Mockito.any(VersionCorrection.class))).thenReturn(exchange);
((OngoingStubbing) Mockito.when(source.get(Mockito.any(ExternalIdBundle.class), Mockito.any(VersionCorrection.class)))).thenReturn(Collections.singleton(exchange));
Mockito.when(source.getSingle(Mockito.any(ExternalId.class))).thenReturn(exchange);
Mockito.when(source.getSingle(Mockito.any(ExternalIdBundle.class))).thenReturn(exchange);
return source;
}