Add unit test to cover this method