Database { public static native byte[] GetResumeMarker(String name, String batchHandle) throws VError;  static native VersionedPermissions GetPermissions(String name); static native void SetPermissions(String name, VersionedPermissions permissions); static native void Create(String name, Permissions permissions); static native void Destroy(String name); static native boolean Exists(String name); static native String BeginBatch(String name, BatchOptions options); static native List<Id> ListCollections(String name, String batchHandle); static native void Commit(String name, String batchHandle); static native void Abort(String name, String batchHandle); static native byte[] GetResumeMarker(String name, String batchHandle); static native List<Id> ListSyncgroups(String name); static native void CreateSyncgroup(String name, Id syncgroupId, SyncgroupSpec spec, SyncgroupMemberInfo info); static native SyncgroupSpec JoinSyncgroup(String name, String remoteSyncbaseName, List<String> expectedSyncbaseBlessings, Id syncgroupId, SyncgroupMemberInfo info); static native void LeaveSyncgroup(String name, Id syncgroupId); static native void DestroySyncgroup(String name, Id syncgroupId); static native void EjectFromSyncgroup(String name, Id syncgroupId, String member); static native VersionedSyncgroupSpec GetSyncgroupSpec(String name, Id syncgroupId); static native void SetSyncgroupSpec(String name, Id syncgroupId, VersionedSyncgroupSpec spec); static native Map<String, SyncgroupMemberInfo> GetSyncgroupMembers(String name, Id syncgroupId); static native void WatchPatterns(String name, byte[] resumeMarker, List<CollectionRowPattern> patterns, WatchPatternsCallbacks callbacks); static native long SyncgroupInvitesNewScan(String name, SyncgroupInvitesCallbacks callbacks); static native void SyncgroupInvitesStopScan(long id);  }
@Test public void getResumeMarker() { Id dbId = new Id("idp:a:angrybirds", "get_resume_marker"); String dbName = dbId.encode(); try { Database.Create(dbName, anyDbPermissions()); String batchHandle = Database.BeginBatch(dbName, null); byte[] marker = Database.GetResumeMarker(dbName, batchHandle); assertNotNull(marker); assertTrue(marker.length > 0); } catch (VError vError) { vError.printStackTrace(); fail(vError.toString()); } }