Added output tests for residuals