final ConventionBundleSource source = new DefaultConventionBundleSource(repo);
final BusinessDayConvention modified = BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following");
final BusinessDayConvention following = BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following");
final DayCount actact = DayCountFactory.INSTANCE.getDayCount("Actual/360");
final ConventionBundle conventions = source.getConventionBundle(ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "USD LIBOR O/N"));
AssertJUnit.assertEquals("USD LIBOR O/N", conventions.getName());
AssertJUnit.assertEquals("US00O/N Index", conventions.getIdentifiers().getValue(ExternalSchemes.BLOOMBERG_TICKER));
AssertJUnit.assertEquals("USD LIBOR O/N", conventions.getIdentifiers().getValue(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME));
final UniqueId uidON = conventions.getUniqueId();
AssertJUnit.assertEquals(InMemoryConventionBundleMaster.IN_MEMORY_UNIQUE_SCHEME.getName(), uidON.getScheme());
AssertJUnit.assertEquals(actact, conventions.getDayCount());
AssertJUnit.assertEquals(following, conventions.getBusinessDayConvention());
AssertJUnit.assertEquals(0, (int) conventions.getSettlementDays());
final ConventionBundle conventions2 = source.getConventionBundle(ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "USD LIBOR 3m"));
AssertJUnit.assertEquals("USD LIBOR 3m", conventions2.getName());
AssertJUnit.assertEquals("US0003M Index", conventions2.getIdentifiers().getValue(ExternalSchemes.BLOOMBERG_TICKER));
AssertJUnit.assertEquals("USD LIBOR 3m", conventions2.getIdentifiers().getValue(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME));
final UniqueId uid3M = conventions2.getUniqueId ();
AssertJUnit.assertEquals(InMemoryConventionBundleMaster.IN_MEMORY_UNIQUE_SCHEME.getName(), uid3M.getScheme ());
AssertJUnit.assertEquals(actact, conventions2.getDayCount());
AssertJUnit.assertEquals(modified, conventions2.getBusinessDayConvention());
AssertJUnit.assertEquals(2, (int) conventions2.getSettlementDays());
assertFalse(uidON.equals (uid3M));
}