use of org.apache.flink.api.common.typeutils.base.DoubleValueSerializer in project flink by apache.
the class InstantiationUtilTest method testSerializationToByteArray.
@Test
public void testSerializationToByteArray() throws IOException {
final DoubleValue toSerialize = new DoubleValue(Math.random());
final DoubleValueSerializer serializer = new DoubleValueSerializer();
byte[] serialized = InstantiationUtil.serializeToByteArray(serializer, toSerialize);
DoubleValue deserialized = InstantiationUtil.deserializeFromByteArray(serializer, serialized);
assertEquals("Serialized record is not equal after serialization.", toSerialize, deserialized);
}
Aggregations