Collection { public void destroy() throws VError {} Collection(String parentFullName, Id id, String batchHandle); Id id(); Permissions getPermissions(); void setPermissions(Permissions permissions); void create(Permissions permissions); void destroy(); boolean exists(); Row row(String key); byte[] get(String key); void put(String key, byte[] value); void delete(String key); void deleteRange(byte[] start, byte[] limit);  }
@Test public void destroy() { Id dbId = new Id("idp:a:angrybirds", "core_destroy_collection"); Id collectionId = new Id("...", "collection"); try { Database db = Service.database(dbId); db.create(anyDbPermissions()); BatchDatabase batchDb = db.beginBatch(null); batchDb.collection(collectionId).create(anyCollectionPermissions()); batchDb.commit(); batchDb = db.beginBatch(null); batchDb.collection(collectionId).destroy(); } catch (VError vError) { vError.printStackTrace(); fail(vError.toString()); } }