@Test
public void testSnapshot() throws Exception {

    CoreUser frank = model.construct(CoreUser.class,
                                     ExistentialDomain.Agency, "frank",
                                     "TV's frank");
    WorkspaceResource resource = new WorkspaceResource();
    String snapshot = resource.snapshot(null, model.create());
    assertNotNull(snapshot);
    model.create()
         .configuration()
         .connectionProvider()
         .acquire()
         .rollback();
    assertNull(model.records()
                    .resolve(frank.getRuleform()
                                  .getId()));
    resource.loadSnapshot(null, null,
                          new ByteArrayInputStream(snapshot.getBytes()),
                          model.create());
    assertNotNull(model.records()
                       .resolve(frank.getRuleform()
                                     .getId()));
}