/** @throws Exception */ @Test public void allocateIdsAsyncWithParentKey() throws Exception { Key parentKey = KeyFactory.createKey("Parent", 1); Future<KeyRange> future = DatastoreUtil.allocateIdsAsync(ds, parentKey, "Child", 2); assertThat(future, is(notNullValue())); assertThat(future.get().getSize(), is(2L)); }
/** @throws Exception */ @Test public void allocateIdsAsync() throws Exception { Future<KeyRange> future = DatastoreUtil.allocateIdsAsync(ds, "Hoge", 2); assertThat(future, is(notNullValue())); assertThat(future.get().getSize(), is(2L)); }