@Test
public void testIsReadyReturnsTrueForValidDrmSession() {

  writeTestDataWithEncryptedSections();
  assertReadFormat(/* formatRequired= */ false, FORMAT_ENCRYPTED);
  assertThat(sampleQueue.isReady(/* loadingFinished= */ false)).isFalse();
  when(mockDrmSession.getState()).thenReturn(DrmSession.STATE_OPENED_WITH_KEYS);
  assertThat(sampleQueue.isReady(/* loadingFinished= */ false)).isTrue();
}