Avoid unsupported mock operation

Calling a real method on an interface is not supported by
the Mockito version run by Gradle.

#cherrypick

PiperOrigin-RevId: 737940266
(cherry picked from commit 4daa43b25727d1d197095d0a9e2cc5a3610d881a)
This commit is contained in:
tonihei 2025-03-18 03:38:22 -07:00
parent d8914c31e2
commit 8e2ed3bf4d

View File

@ -233,7 +233,8 @@ public final class DashMediaPeriodTest {
private static DashMediaPeriod createDashMediaPeriod(DashManifest manifest, int periodIndex) {
MediaPeriodId mediaPeriodId = new MediaPeriodId(/* periodUid= */ new Object());
DashChunkSource.Factory chunkSourceFactory = mock(DashChunkSource.Factory.class);
when(chunkSourceFactory.getOutputTextFormat(any())).thenCallRealMethod();
when(chunkSourceFactory.getOutputTextFormat(any()))
.then(invocation -> invocation.getArguments()[0]);
return new DashMediaPeriod(
/* id= */ periodIndex,
manifest,