refactor and add decode_encode_test to pipeline decoder outoput to encoder test