Database extends DatabaseHandle { public void create(Permissions permissions) throws VError { io.v.syncbase.internal.Database.Create(fullName, permissions); } Database(Id id); VersionedPermissions getPermissions(); void setPermissions(VersionedPermissions permissions); void create(Permissions permissions); void destroy(); boolean exists(); BatchDatabase beginBatch(BatchOptions options); Syncgroup syncgroup(String name); Syncgroup syncgroup(Id id); List<Id> listSyncgroups(); void watch(byte[] resumeMarker, List<CollectionRowPattern> patterns,
                      final WatchPatternsCallbacks callbacks); void runInBatch(final BatchOperation op, BatchOptions options);  }
@Test public void create() { Id dbId = new Id("idp:a:angrybirds", "core_create_db"); try { Service.database(dbId).create(anyDbPermissions()); } catch (VError vError) { vError.printStackTrace(); fail(vError.toString()); } boolean exceptionThrown = false; try { Service.database(dbId).create(anyDbPermissions()); } catch (VError vError) { assertEquals("v.io/v23/verror.Exist", vError.id); assertNotNull(vError.message); assertNotNull(vError.stack); assertEquals(0, vError.actionCode); exceptionThrown = true; } assertTrue(exceptionThrown); }