Added unit test for setPlayer function