ShareTweetAction implements View.OnClickListener { String getShareContent(Resources resources) { return resources.getString(R.string.tw__share_content_format, tweet.user.screenName, Long.toString(tweet.id)); } ShareTweetAction(Tweet tweet, TweetUi tweetUi); @Override void onClick(View v);  }
@Test public void testGetShareContent() { final String shareContent = listener.getShareContent(resources); assertEquals(A_SHARE_TEXT, shareContent); }