package it.unimi.dsi.mg4j.tool;
import it.unimi.dsi.fastutil.io.BinIO;
import it.unimi.dsi.mg4j.index.DowncaseTermProcessor;
import it.unimi.dsi.mg4j.index.TermProcessor;
import it.unimi.dsi.fastutil.io.FastByteArrayInputStream;
import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream;
import java.io.IOException;
import junit.framework.TestCase;
public class TestDowncaseTermProcessor extends TestCase {
public void testReadResolve() throws IOException, ClassNotFoundException {
TermProcessor t = DowncaseTermProcessor.getInstance();
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
BinIO.storeObject( t, os );
assertTrue( t == (TermProcessor)BinIO.loadObject( new FastByteArrayInputStream( os.array ) ) );
}
}