title: How to get Spannable and its color from TextView to write a unit test
body: <pre><code>private void createStringEndingInRedColor(TextView tv, String word1, String word2) {
      Spannable word = new SpannableString(word1);
      tv.setText(word);
  
      Spannable wordTwo = new SpannableString(word2);
  
      wordTwo.setSpan(new ForegroundColorSpan(mContext.getResources().getColor(Color.RED)), 0, wordTwo.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
      tv.append(wordTwo);
  }
  </code></pre>
  
  <p>I'm trying to write a unit test (using Robolectric) for the TextView tv to ensure that wordTwo is Color.RED.  However, I only have a reference to TextView tv.  How does one go about such a task?</p>