Fix codec unit test to new API