@Test
public void testReturnsTheRealImageIfThereAreNoAdaptiveMediasAndRunsTheProcess()
	throws Exception {

	AMImageConfigurationEntry amImageConfigurationEntry =
		_createAMImageConfigurationEntry(
			_fileVersion.getCompanyId(), 200, 500);
	HttpServletRequest httpServletRequest = _createRequestFor(
		_fileVersion, amImageConfigurationEntry);
	Mockito.when(
		_amImageFinder.getAdaptiveMediaStream(Mockito.any(Function.class))
	).thenAnswer(
		invocation -> Stream.empty()
	);
	Optional<AdaptiveMedia<AMImageProcessor>> adaptiveMediaOptional =
		_amImageRequestHandler.handleRequest(httpServletRequest);
	Assert.assertTrue(adaptiveMediaOptional.isPresent());
	AdaptiveMedia<AMImageProcessor> adaptiveMedia =
		adaptiveMediaOptional.get();
	Assert.assertEquals(
		_fileVersion.getContentStream(false),
		adaptiveMedia.getInputStream());
	Assert.assertEquals(
		Optional.of(_fileVersion.getFileName()),
		adaptiveMedia.getValueOptional(
			AMAttribute.getFileNameAMAttribute()));
	Assert.assertEquals(
		Optional.of(_fileVersion.getMimeType()),
		adaptiveMedia.getValueOptional(
			AMAttribute.getContentTypeAMAttribute()));
	Optional<Long> contentLength = adaptiveMedia.getValueOptional(
		AMAttribute.getContentLengthAMAttribute());
	Assert.assertEquals(_fileVersion.getSize(), (long)contentLength.get());
	Mockito.verify(
		_amAsyncProcessor
	).triggerProcess(
		_fileVersion, String.valueOf(_fileVersion.getFileVersionId())
	);
}