Added unit test for this method.