@Test
  public void testHeight() {
    BetterImageSpan span = new BetterImageSpan(mDrawable, mAlignment);
    span.getSize(null, null, 0, 0, mFontMetrics);
    assertThat(mFontMetrics.descent)
        .describedAs("Descent for " + mDescription)
        .isEqualTo(mExpectedDescent);
    assertThat(mFontMetrics.ascent)
        .describedAs("Ascent for " + mDescription)
        .isEqualTo(mExpectedAscent);
    assertThat(mFontMetrics.top).describedAs("Top for " + mDescription).isEqualTo(mExpectedTop);
    assertThat(mFontMetrics.bottom)
        .describedAs("Bottom for " + mDescription)
        .isEqualTo(mExpectedBottom);
  }
Tests the dimensions assigned by {@link BetterImageSpan} ensuring the width/height of is
calculated correctly for different combinations of image and text height, as well as span
alignment.
fbcore/src/test/java/com/facebook/widget/text/span/BetterImageSpanTest.java