@Override
 public Collection<Security> get(ExternalIdBundle bundle, VersionCorrection versionCorrection) {
   ArgumentChecker.notNull(bundle, "bundle");
   // best implementation is to return first matching result
   for (SecuritySource delegateSource : _delegator.getDelegates().values()) {
     Collection<Security> result = delegateSource.get(bundle, versionCorrection);
     if (!result.isEmpty()) {
       return result;
     }
   }
   return _delegator.getDefaultDelegate().get(bundle, versionCorrection);
 }
 public void testGetSecurities_byExternalIdBundle() {
   final SecuritySource underlying = Mockito.mock(SecuritySource.class);
   final SecuritySource coalescing = new CoalescingSecuritySource(underlying);
   coalescing.get(ExternalIdBundle.EMPTY);
   Mockito.verify(underlying).get(ExternalIdBundle.EMPTY);
 }
 public void testGetSecurity_byExternalIdBundleVersionCorrection() {
   final SecuritySource underlying = Mockito.mock(SecuritySource.class);
   final SecuritySource coalescing = new CoalescingSecuritySource(underlying);
   coalescing.get(ExternalIdBundle.EMPTY, VersionCorrection.LATEST);
   Mockito.verify(underlying).get(ExternalIdBundle.EMPTY, VersionCorrection.LATEST);
 }
 public void testGetSecurity_byObjectId() {
   final SecuritySource underlying = Mockito.mock(SecuritySource.class);
   final SecuritySource coalescing = new CoalescingSecuritySource(underlying);
   coalescing.get(ObjectId.of("Test", "Test"), VersionCorrection.LATEST);
   Mockito.verify(underlying).get(ObjectId.of("Test", "Test"), VersionCorrection.LATEST);
 }