@Test
public void testDecodePositionsWithMissingPlayResY() throws IOException {

  SsaDecoder decoder = new SsaDecoder();
  byte[] bytes =
      TestUtil.getByteArray(
          ApplicationProvider.getApplicationContext(), POSITIONS_WITHOUT_PLAYRES);
  Subtitle subtitle = decoder.decode(bytes, bytes.length, false);
  // The dialogue line has a valid \pos() override, but it's ignored because PlayResY isn't
  // set (so we don't know the denominator).
  Cue firstCue = Iterables.getOnlyElement(subtitle.getCues(subtitle.getEventTime(0)));
  assertWithMessage("Cue.position").that(firstCue.position).isEqualTo(Cue.DIMEN_UNSET);
  assertWithMessage("Cue.lineType").that(firstCue.lineType).isEqualTo(Cue.LINE_TYPE_FRACTION);
  assertWithMessage("Cue.line").that(firstCue.line).isEqualTo(Cue.DIMEN_UNSET);
}