assertEquals(1, storedArray.size());
assertEquals("arrayInsert", storedArray.getString(0));
}
@Test
public void testArrayInsertAtExistingIndex() {
<BUG>DocumentFragment<String> fragment = DocumentFragment.create(key, "array[1]", "arrayInsert");
DocumentFragment<String> result = ctx.bucket().arrayInsertIn(fragment, PersistTo.NONE, ReplicateTo.NONE);
assertNotNull(result);
assertNotEquals(fragment.cas(), result.cas());
</BUG>
JsonArray storedArray = ctx.bucket().get(key).content().getArray("array");

assertEquals(1, storedArray.size());
assertEquals("arrayInsert", storedArray.getString(0));
}
@Test
public void testArrayInsertAtExistingIndex() {
DocumentFragment<Mutation> result = ctx.bucket()
.mutateIn(key)
.arrayInsert("array[1]", "arrayInsert")
.doMutate();
assertNotNull(result);
assertNotEquals(0L, result.cas());
JsonArray storedArray = ctx.bucket().get(key).content().getArray("array");
