@Test(expected = AMRuntimeException.class)
public void testFinderFailsWithPortalException() throws Exception {

	AMImageConfigurationEntry getConfigurationEntryFilter =
		_createAMImageConfigurationEntry(
			_fileVersion.getCompanyId(), 200, 500);
	HttpServletRequest httpServletRequest = _createRequestFor(
		_fileVersion, getConfigurationEntryFilter);
	Mockito.when(
		_amImageFinder.getAdaptiveMediaStream(Mockito.any(Function.class))
	).thenThrow(
		PortalException.class
	);
	_amImageRequestHandler.handleRequest(httpServletRequest);
}