localEmployeeData.put(mediaResourceMimeTypeKey, "image/jpeg");
EdmEntitySet employeesSet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees");
EdmMapping mapping = employeesSet.getEntityType().getMapping();
when(mapping.getMediaResourceSourceKey()).thenReturn(mediaResourceSourceKey);
when(mapping.getMediaResourceMimeTypeKey()).thenReturn(mediaResourceMimeTypeKey);
ODataResponse response = ser.writeEntry(employeesSet, localEmployeeData, DEFAULT_PROPERTIES);
String xmlString = verifyResponse(response);
assertXpathExists(
"/a:entry/a:link[@href=\"Employees('1')/$value\" and" +
" @rel=\"edit-media\" and @type=\"image/jpeg\"]", xmlString);