Merge "Refactor decode_api_test and realtime_test"