Added a test function that outputs the expected result