@Test
public void testParseWellFormedUnclosedEndAtParent() throws Exception {

  Spanned text = parseCueText("An unclosed u tag with <i><u>underline and italic</i> inside");
  assertThat(text.toString()).isEqualTo("An unclosed u tag with underline and italic inside");
  UnderlineSpan[] underlineSpans = getSpans(text, UnderlineSpan.class);
  StyleSpan[] styleSpans = getSpans(text, StyleSpan.class);
  assertThat(underlineSpans).hasLength(1);
  assertThat(styleSpans).hasLength(1);
  assertThat(text.getSpanStart(underlineSpans[0])).isEqualTo(23);
  assertThat(text.getSpanStart(styleSpans[0])).isEqualTo(23);
  assertThat(text.getSpanEnd(underlineSpans[0])).isEqualTo(43);
  assertThat(text.getSpanEnd(styleSpans[0])).isEqualTo(43);
  assertThat(styleSpans[0].getStyle()).isEqualTo(ITALIC);
}