@Test
public void testUsesTheValuesFromTheAdaptiveMediasIfPresent()
	throws Exception {

	int auto = 0;
	_addConfigs(
		_createAMImageConfigurationEntry(
			"hauto", auto, 600, StringPool.BLANK),
		_createAMImageConfigurationEntry("low", 300, 300, StringPool.BLANK),
		_createAMImageConfigurationEntry(
			"normal", 2048, 1024, StringPool.BLANK),
		_createAMImageConfigurationEntry(
			"wauto", 900, auto, StringPool.BLANK));
	_addAdaptiveMedias(
		_fileEntry, _createAdaptiveMedia("low", 300, 169, "lowURL"),
		_createAdaptiveMedia("wauto", 900, 506, "wautoURL"),
		_createAdaptiveMedia("hauto", 1067, 600, "hautoURL"),
		_createAdaptiveMedia("normal", 1334, 750, "normalURL"));
	List<MediaQuery> mediaQueries = _mediaQueryProviderImpl.getMediaQueries(
		_fileEntry);
	Assert.assertEquals(mediaQueries.toString(), 4, mediaQueries.size());
	_assertMediaQuery(mediaQueries.get(0), "lowURL", 169);
	_assertMediaQuery(mediaQueries.get(1), "wautoURL", 169, 506);
	_assertMediaQuery(mediaQueries.get(2), "hautoURL", 506, 600);
	_assertMediaQuery(mediaQueries.get(3), "normalURL", 600, 750);
}