template.setAllowCreate(true);
try {
createTemplate().execute(new JcrMappingCallback() {
public Object doInJcrMapping(PersistenceManager manager) throws JcrMappingException {
throw new JcrMappingException("some jcr mapping exception");
}
});
fail("Should have thrown JcrSystemException");
} catch (JcrSystemException e) {
// expected