public void XtestDuplicateWriteExecuteBulk() throws Exception {
    List<BulkItem> bulkItems = new ArrayList<BulkItem>();
    bulkItems.add(new MockBulkItem(new Simple(1, "test"), BulkItem.WRITE));
    bulkItems.add(new MockBulkItem(new Simple(1, "test"), BulkItem.UPDATE));
    bulkDataPersister.executeBulk(bulkItems);

    assertNotNull(session.get(Simple.class, 1));
  }
  public void XtestDuplicateDeleteExecuteBulk() throws Exception {
    session.save(new Simple(1, "test"));
    assertNotNull(session.get(Simple.class, 1));

    List<BulkItem> bulkItems = new ArrayList<BulkItem>();
    bulkItems.add(new MockBulkItem(new Simple(1, "test"), BulkItem.REMOVE));
    bulkItems.add(new MockBulkItem(new Simple(1, "test"), BulkItem.REMOVE));
    bulkDataPersister.executeBulk(bulkItems);

    assertNull(session.get(Simple.class, 2));
  }
  public void testSimpleExecuteBulk() throws Exception {
    Transaction tx = session.beginTransaction();
    session.save(new Simple(2, "test"));
    tx.commit();
    session.close();

    session.flush();
    session.close();

    List<BulkItem> bulkItems = new ArrayList<BulkItem>();
    bulkItems.add(new MockBulkItem(new Simple(1, "test"), BulkItem.WRITE));
    bulkItems.add(new MockBulkItem(new Simple(2, "test"), BulkItem.REMOVE));
    bulkItems.add(new MockBulkItem(new Simple(3, "test"), BulkItem.UPDATE));
    bulkDataPersister.executeBulk(bulkItems);

    session = sessionFactory.openSession();
    assertNotNull(session.get(Simple.class, 1));
    assertNull(session.get(Simple.class, 2));
    assertNotNull(session.get(Simple.class, 3));
    session.close();
  }