@Test
public void testSerializeAdaptiveMediaWithEmptyAttributes()
	throws Exception {

	Map<String, String> properties = new HashMap<>();
	AdaptiveMedia<AMImageProcessor> adaptiveMedia = new AMImage(
		() -> null, AMImageAttributeMapping.fromProperties(properties),
		new URI("http://localhost"));
	AMImageSerializer amImageSerializer = new AMImageSerializerImpl();
	String serialize = amImageSerializer.serialize(adaptiveMedia);
	JSONObject jsonObject = JSONFactoryUtil.createJSONObject(serialize);
	JSONObject attributesJSONObject = jsonObject.getJSONObject(
		"attributes");
	Assert.assertEquals(0, attributesJSONObject.length());
}