created test case for method getName