title: Is it ok to change method visibility for the sake of unit testing?
body: <p>Many times I find myself torn between making a method private to prevent someone from calling it in a context that doesn't make sense (or would screw up the internal state of the object involved), or making the method public (or typically internal) in order to expose it to the unit test assembly. I was just wondering what the Stack Overflow community thought of this dilemma? </p>
  
  <p>So I guess the question truly is, is it better to focus on testability or on maintaining proper encapsulation? </p>
  
  <p>Lately I've been leaning towards testability, as most of the code is only going to be leveraged by a small group of developers, but I thought I would see what everyone else thought?</p>