@Test
public void testResolveStyleMultipleReferentialStyles() {

  Map<String, TtmlStyle> globalStyles = getGlobalStyles();
  String[] styleIds = {"s0", "s1"};
  TtmlStyle resolved = TtmlRenderUtil.resolveStyle(null, styleIds, globalStyles);
  assertThat(resolved).isNotSameInstanceAs(globalStyles.get("s0"));
  assertThat(resolved).isNotSameInstanceAs(globalStyles.get("s1"));
  assertThat(resolved.getId()).isNull();
  // inherited from s0
  assertThat(resolved.getBackgroundColor()).isEqualTo(BLACK);
  // inherited from s1
  assertThat(resolved.getFontColor()).isEqualTo(RED);
  // merged from s0 and s1
  assertThat(resolved.getStyle()).isEqualTo(STYLE_BOLD_ITALIC);
}