@Test
public void testDeserializeWithEmptyAttributes() throws Exception {

	JSONObject jsonObject = JSONUtil.put("uri", "http://localhost");
	JSONObject attributesJSONObject = JSONFactoryUtil.createJSONObject();
	jsonObject.put("attributes", attributesJSONObject);
	AMImageSerializer amImageSerializer = new AMImageSerializerImpl();
	InputStream inputStream = Mockito.mock(InputStream.class);
	AdaptiveMedia<AMImageProcessor> adaptiveMedia =
		amImageSerializer.deserialize(
			jsonObject.toString(), () -> inputStream);
	Assert.assertEquals(
		new URI("http://localhost"), adaptiveMedia.getURI());
	Optional<Integer> heightValueOptional = adaptiveMedia.getValueOptional(
		AMImageAttribute.AM_IMAGE_ATTRIBUTE_HEIGHT);
	Assert.assertFalse(heightValueOptional.isPresent());
	Optional<Integer> widthValueOptional = adaptiveMedia.getValueOptional(
		AMImageAttribute.AM_IMAGE_ATTRIBUTE_WIDTH);
	Assert.assertFalse(widthValueOptional.isPresent());
}