@Test
public void attemptGetSyncgroupWithinBatch() throws SyncbaseException,
        ExecutionException, InterruptedException {

    BatchDatabase batch = Syncbase.database().beginBatch(new Database.BatchOptions());
    // Create collection without a syncgroup
    Collection collection = batch.createCollection(
            new CollectionOptions().setWithoutSyncgroup(true));
    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage("Must not call getSyncgroup within batch");
    collection.getSyncgroup();
}