CorpusChunk extends ConcurrentChunk<Text, Text, Position> implements
        SearchIndex { @Override @DoNotInvoke public final CorpusRevision insert(Text locator, Text key, Position value, long version, Action type) { throw new UnsupportedOperationException(); } protected  CorpusChunk(@Nullable Segment segment, BloomFilter filter); private  CorpusChunk(@Nullable Segment segment, Path file, long position,
            long size, BloomFilter filter, Manifest manifest); static CorpusChunk create(BloomFilter filter); static CorpusChunk create(@Nullable Segment segment,
            BloomFilter filter); static CorpusChunk load(Path file, long position, long size,
            BloomFilter filter, Manifest manifest); static CorpusChunk load(@Nullable Segment segment, Path file,
            long position, long size, BloomFilter filter, Manifest manifest); @Override void index(Text key, Text term, Position position, long version,
            Action type); @Override @DoNotInvoke final CorpusRevision insert(Text locator, Text key, Position value,
            long version, Action type); final void insert(Text key, Value value, PrimaryKey record,
            long version, Action type);  }
@Override @Test(expected = IllegalStateException.class) public void testCannotInsertInFrozenChunk() { Text locator = Variables.register("locator", getLocator()); Value value = Variables.register("value", getStringValue()); PrimaryKey record = Variables.register("record", getRecord()); ((CorpusChunk) chunk).insert(locator, value, record, Time.now(), Action.ADD); if(chunk.size() <= 0) { value = Variables.register("value", getStringValue()); ((CorpusChunk) chunk).insert(locator, value, record, Time.now(), Action.ADD); } chunk.freeze(file); ((CorpusChunk) chunk).insert(locator, value, record, Time.now(), Action.ADD); }