This should be private (use reflection to make it callable in your tests).