Added unit test for checking task 4 in issue #419