public void testExceptionDuringItemUpdate() throws Exception { final Holder holder = retrieveOnlyInstance(Holder.class); final Item item = retrieveOnlyInstance(Item.class); holder.item = item; withException( new Block4() { @Override public void run() { db().store(holder, Integer.MAX_VALUE); } }); checkConsistencyFull(); }
public void testExceptionDuringNewListUpdate() throws Exception { final Holder holder = retrieveOnlyInstance(Holder.class); Item item = retrieveOnlyInstance(Item.class); holder.list = new ArrayList<Item>(); holder.list.add(item); withException( new Block4() { @Override public void run() { db().store(holder, Integer.MAX_VALUE); } }); checkConsistencyFull(); }