test encoding before decoding an abstract