assertEquals(doc.fieldType("string"), OType.STRING);
assertEquals(doc.fieldType("binary"), OType.BINARY);
ORecordSerializer ser = ODatabaseDocumentTx.getDefaultSerializer();
byte[] bytes = ser.toStream(doc, false);
doc = new ODocument();
ser.fromStream(bytes, doc, null);
assertEquals(doc.fieldType("integer"), OType.INTEGER);
assertEquals(doc.fieldType("string"), OType.STRING);
assertEquals(doc.fieldType("binary"), OType.BINARY);
assertEquals(doc.fieldType("link"), OType.LINK);
}