title: How to unit test the std::bind function using gtest?
body: <p>I am trying to write unittest cases for some of the cpp files in my project.</p>
  
  <p>The scenario here is: 
  I have a cpp file with only one public method defined and in turn which calls private methods. </p>
  
  <p>Here the private methods are called in the public method as a callback method. How do I test the private methods here. I will be doing the mocking for Callback pointer and I am not sure how to call the private method. </p>
  
  <p>Please give me some suggestions how to call the private methods in this scenario without changing the source code.</p>
  
  <p>Here is the ex: </p>
  
  <pre><code>buttonListenerList &lt;&lt;
   sourceButton-&gt;addButtonActionCallback(std::bind(&amp;AudioSource::buttonCallback, this, _1, _2));
  </code></pre>
  
  <p>This peace of code is defined in the public method. Now the <code>AudioSource::buttonCallback</code> is a private method. How do you make sure to call this private method by calling the public method.</p>