Rewrite a test to check actual output rather than intermediate implementation