@Test
public void getCodecProfileAndLevel_rejectsNullCodecString() {

  Format format =
      Format.createVideoSampleFormat(
          /* id= */ null,
          /* sampleMimeType= */ MimeTypes.VIDEO_UNKNOWN,
          /* codecs= */ null,
          /* bitrate= */ Format.NO_VALUE,
          /* maxInputSize= */ Format.NO_VALUE,
          /* width= */ 1024,
          /* height= */ 768,
          /* frameRate= */ Format.NO_VALUE,
          /* initializationData= */ null,
          /* drmInitData= */ null);
  assertThat(MediaCodecUtil.getCodecProfileAndLevel(format)).isNull();
}