}
@Test
public void test2() throws IOException {
List<String> terms = Lists.newArrayList("apple", "bannana", "cherry", "grape", "watermelon");
FrontCodedStringList list = new FrontCodedStringList(terms, 8, true);
assertEquals("apple", list.get(0).toString());
assertEquals("bannana", list.get(1).toString());
assertEquals("cherry", list.get(2).toString());
assertEquals("grape", list.get(3).toString());
assertEquals("watermelon", list.get(4).toString());
File f = new File("test.dat");
BinIO.storeObject(list, f);
try {
FrontCodedStringList list2 = (FrontCodedStringList) BinIO.loadObject(f);
assertEquals("apple", list2.get(0).toString());
assertEquals("bannana", list2.get(1).toString());
assertEquals("cherry", list2.get(2).toString());
assertEquals("grape", list2.get(3).toString());
assertEquals("watermelon", list2.get(4).toString());
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
f.delete();