add getMethodAsPublic() helper

[Proposal] add getMethodAsPublic() for testing private and protected methods