@Test
public void testParseCloseNonExistingTag() throws Exception {

  Spanned text = parseCueText("blah<b>blah</i>blah</b>blah");
  assertThat(text.toString()).isEqualTo("blahblahblahblah");
  StyleSpan[] spans = getSpans(text, StyleSpan.class);
  assertThat(spans).hasLength(1);
  assertThat(spans[0].getStyle()).isEqualTo(BOLD);
  assertThat(text.getSpanStart(spans[0])).isEqualTo(4);
  assertThat(text.getSpanEnd(spans[0])).isEqualTo(8); // should be 12 when valid
}