assertContextProperty((ContextProperty)dc.getProperties().iterator().next());
}
private <T> T serDeser(T obj, Class<T> type) throws Exception {
FormatType format = FormatType.JSON; //FormatType.XML_BEAN; //FormatType.SER_OBJECT;
CompressionType compression = null; //CompressionType.ZIP; //CompressionType.GZIP;
Serializer ser = SerializerFactory.create(format, compression, true);
//ser.setPrettyPrint(true);
byte[] bytes = ser.serialize(obj, type);
//System.out.println(new String(bytes));
return ser.deserialize(bytes, type);