Fix unit testing data copy-to-output