@Test
public void onImageAvailableIgnoresImagesWithInvalidRowStrides() {

  // rowStride should be the number of bytes per row plus optionally some padding; it should
  // never be lower than widthStub * pixelStrideStub, but if it is, we shouldn't crash.
  rowStrideStub = widthStub * pixelStrideStub - 1;
  setupMocksToCreateBitmap();
  testSubject.onImageAvailable(imageReaderMock);
  verify(bitmapMock, times(0)).copyPixelsFromBuffer(imagePlaneStubBuffer);
  verify(bitmapConsumerMock, times(0)).accept(bitmapMock);
}