Moving test of private method into public method