Added tests for codec.