title: How to test an object's private methods in Scala
body: <p>I have an example object:</p>
  
  <pre><code>object Foo {
    private def sayFoo = "Foo!"
  }
  </code></pre>
  
  <p>And I want to test the private sayFoo method without the following workarounds:
  1. Without defining it as package private
  2. without defining it as protected and than inheriting it in the test class</p>
  
  <p>I saw one possible solution which is to extend privateMethodTester but it doesn't
  seem to work for objects just classes.</p>
  
  <p>Now, I know that some, if not many, say that you are not suppose to test private methods but rather only public ones (api). Nonetheless, I still do want to test them.</p>
  
  <p>thx in advanced</p>