sliceStore.openWrite(Utils.weekStartTime(100)-1, Utils.weekStartTime(100));
fail("should fail!");
} catch(IllegalArgumentException e) {
}
Slice slice = new Slice(Utils.weekStartTime(100), Utils.weekStartTime(100));
TypedRecordOutputStream os = sliceStore.openWrite(slice);
os.writeObject("a1");
os.writeObject("a2");
os.close();
try {
sliceStore.openRead(slice);
fail("should fail!");
} catch(IllegalArgumentException e) {
}
assertFalse(sliceStore.isSliceExists(slice));
sliceStore.finishSlice(slice);
assertTrue(sliceStore.isSliceExists(slice));
assertSliceContains(sliceStore, slice, "a1", "a2");
try {
sliceStore.openWrite(Utils.weekStartTime(99), Utils.weekStartTime(99)+1);
fail("should fail!");
} catch(IllegalArgumentException e) {
}
Slice slice2 = new Slice(Utils.weekStartTime(100), Utils.weekStartTime(100)+10);
os = sliceStore.openWrite(slice2);
os.writeObject("b");
os.close();
sliceStore.finishSlice(slice2);