@Test
public void onImageAvailableProcessesImageOnlyOnce() {

  setupMocksToCreateBitmap();
  testSubject.onImageAvailable(imageReaderMock);
  reset(
      imageReaderMock,
      bitmapConsumerMock,
      imageMock,
      imagePlaneMock,
      bitmapProviderMock,
      bitmapMock);
  testSubject.onImageAvailable(imageReaderMock);
  verify(bitmapMock, times(0)).copyPixelsFromBuffer(any());
  verify(bitmapConsumerMock, times(0)).accept(any());
}