in component-test/src/main/java/org/apache/fineract/cn/accounting/TestAccount.java [109:118]
public void shouldNotCreateAccountUnknownLedger() throws Exception {
final Account account = AccountGenerator.createRandomAccount(RandomStringUtils.randomAlphanumeric(8));
try {
this.testSubject.createAccount(account);
Assert.fail();
} catch (final IllegalArgumentException ex) {
Assert.assertTrue(ex.getMessage().contains(account.getLedger()));
}
}