title: How can I unit test an Android Activity that acts on Accelerometer?
body: <p>I am starting with an Activity based off of this <a href="http://www.clingmarks.com/?paged=2" rel="noreferrer">ShakeActivity</a> and I want to write some unit tests for it.  I have written some small unit tests for Android activities before but I'm not sure where to start here.  I want to feed the accelerometer some different values and test how the activity responds to it.  For now I'm keeping it simple and just updating a private int counter variable and a TextView when a "shake" event happens.  </p>
  
  <p>So my question largely boils down to this:  </p>
  
  <p><strong>How can I send fake data to the accelerometer from a unit test?</strong></p>