storage.start();
assertEquals(storage.getStatus(), Status.STARTED);
assertEquals(storage.segments.length, 1);
SplitFileInserterSegmentStorage segment = storage.segments[0];
segment.onFailure(0, new InsertException(InsertExceptionMode.INTERNAL_ERROR));
data.proceed(); // Now it will complete encoding, and then report in, and then fail.
try {
cb.waitForFinishedEncode();
assertFalse(true); // Should have failed.
} catch (InsertException e) {
assertTrue(executor.isIdle());