@Test
public void testGetPreviewAsStreamReturnsTheOriginalStreamWhenNoAMImageExists()
	throws Exception {

	Mockito.when(
		_amImageFinder.getAdaptiveMediaStream(Mockito.any(Function.class))
	).thenAnswer(
		invocation -> Stream.empty()
	);
	Mockito.when(
		_amImageMimeTypeProvider.isMimeTypeSupported(Mockito.anyString())
	).thenReturn(
		true
	);
	Mockito.when(
		_amImageValidator.isValid(_fileVersion)
	).thenReturn(
		true
	);
	InputStream originalInputStream = Mockito.mock(InputStream.class);
	Mockito.when(
		_fileVersion.getContentStream(false)
	).thenReturn(
		originalInputStream
	);
	Assert.assertEquals(
		originalInputStream,
		_amImageEntryProcessor.getPreviewAsStream(_fileVersion));
}