public void testSaveLoadRoundtrip() throws IOException { val baos = new ByteArrayOutputStream(3200); val dos = new DataOutputStream(baos); avengers.save(dos); val dis = new DataInputStream(new ByteArrayInputStream(baos.toByteArray())); val otherAvengers = Indexer.load(dis); assertEquals(avengers, otherAvengers); }