CreditRating.A,
CreditRatingFitch.A,
CreditRatingMoodys.A,
CreditRatingStandardAndPoors.A,
false);
OrganizationDocument doc = new OrganizationDocument(org);
String shortName = doc.getOrganization().getObligor().getObligorShortName();
String redCode = doc.getOrganization().getObligor().getObligorREDCode();
String ticker = doc.getOrganization().getObligor().getObligorTicker();
CreditRatingFitch creditRatingFitch = doc.getOrganization().getObligor().getFitchCreditRating();
CreditRating compositeCreditRating = doc.getOrganization().getObligor().getCompositeRating();
CreditRating impliedCreditRating = doc.getOrganization().getObligor().getImpliedRating();
CreditRatingMoodys creditRatingMoodys = doc.getOrganization().getObligor().getMoodysCreditRating();
CreditRatingStandardAndPoors creditRatingStandardAndPoors = doc.getOrganization().getObligor().getStandardAndPoorsCreditRating();
String country = doc.getOrganization().getObligor().getCountry();
Sector sector = doc.getOrganization().getObligor().getSector();
Region region = doc.getOrganization().getObligor().getRegion();
boolean hasDefaulted = doc.getOrganization().getObligor().isHasDefaulted();
OrganizationDocument test = _orgMaster.add(doc);
UniqueId uniqueId = test.getUniqueId();
assertNotNull(uniqueId);
assertEquals("DbOrg", uniqueId.getScheme());
assertTrue(uniqueId.isVersioned());
assertTrue(Long.parseLong(uniqueId.getValue()) >= 1000);
assertEquals("0", uniqueId.getVersion());
assertEquals(now, test.getVersionFromInstant());
assertEquals(null, test.getVersionToInstant());
assertEquals(now, test.getCorrectionFromInstant());
assertEquals(null, test.getCorrectionToInstant());
ManageableOrganization testOrganization = test.getOrganization();
assertNotNull(testOrganization);
assertEquals(uniqueId, testOrganization.getUniqueId());
assertEquals(shortName, test.getOrganization().getObligor().getObligorShortName());
assertEquals(redCode, test.getOrganization().getObligor().getObligorREDCode());
assertEquals(ticker, test.getOrganization().getObligor().getObligorTicker());
assertEquals(creditRatingFitch, test.getOrganization().getObligor().getFitchCreditRating());
assertEquals(compositeCreditRating, test.getOrganization().getObligor().getCompositeRating());
assertEquals(impliedCreditRating, test.getOrganization().getObligor().getImpliedRating());
assertEquals(creditRatingMoodys, test.getOrganization().getObligor().getMoodysCreditRating());
assertEquals(creditRatingStandardAndPoors, test.getOrganization().getObligor().getStandardAndPoorsCreditRating());
assertEquals(country, test.getOrganization().getObligor().getCountry());
assertEquals(sector, test.getOrganization().getObligor().getSector());
assertEquals(region, test.getOrganization().getObligor().getRegion());
assertEquals(hasDefaulted, test.getOrganization().getObligor().isHasDefaulted());
}