try {
File tempFile = File.createTempFile(BinaryTest.class.getName(), "vocab");
FileOutputStream outputStream = new FileOutputStream(tempFile);
ObjectOutput out = new BinaryOut(outputStream, true);
vocab.writeExternal(out);
ObjectInput in = new BinaryIn<Vocabulary>(tempFile.getAbsolutePath(), Vocabulary.class);
Object o = in.readObject();
Assert.assertTrue(o instanceof Vocabulary);