@Test
public void create() {

    Id dbId = new Id("idp:a:angrybirds", "core_create_collection");
    Id collectionId1 = new Id("...", "collection1");
    Id collectionId2 = new Id("...", "collection2");
    try {
        Database db = Service.database(dbId);
        db.create(anyDbPermissions());
        BatchDatabase batchDb = db.beginBatch(null);
        batchDb.collection(collectionId1).create(anyCollectionPermissions());
        batchDb.collection(collectionId2).create(anyCollectionPermissions());
        List<Id> collections = batchDb.listCollections();
        assertNotNull(collections);
        assertEquals(2, collections.size());
        assertEquals(collectionId1.encode(), collections.get(0).encode());
        assertEquals(collectionId2.encode(), collections.get(1).encode());
    } catch (VError vError) {
        vError.printStackTrace();
        fail(vError.toString());
    }
}