public class BSONTypeSerializableTest extends TestCase {
@Test
public void testSerializeMinKey() throws Exception {
MinKey key = new MinKey();
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
objectOutputStream.writeObject(key);
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
MinKey key2 = (MinKey) objectInputStream.readObject();
}