{
final OBCriteria<Currency> cc = OBDal.getInstance().createCriteria(Currency.class);
cc.add(Expression.eq(Currency.PROPERTY_ISOCODE, "USD"));
final List<Currency> cs = cc.list();
final Currency currency = cs.get(0);
final CashBook c = OBProvider.getInstance().get(CashBook.class);
c.setName("c_" + System.currentTimeMillis());
c.setDescription("test");
c.setDefault(false);
c.set(CashBook.PROPERTY_CURRENCY, currency);
OBDal.getInstance().save(c);
cashBookId = c.getId();
SessionHandler.getInstance().commitAndClose();
}
// now check if the save indeed worked out by seeing if there is a
// cashbook account