assertXpathNotExists("/a:entry/a:content[@src=\"http://localhost:8080/images/image1\"]", xmlString);
}
@Test
public void serializeWithCustomSrcAndTypeAttributeOnRoom() throws Exception {
AtomEntityProvider ser = createAtomEntityProvider();
Map<String, Object> localRoomData = new HashMap<String, Object>(roomData);
String mediaResourceSourceKey = "~src";
localRoomData.put(mediaResourceSourceKey, "http://localhost:8080/images/image1");
String mediaResourceMimeTypeKey = "~type";
localRoomData.put(mediaResourceMimeTypeKey, "image/jpeg");
EdmEntitySet roomsSet = MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Rooms");
EdmEntityType roomType = roomsSet.getEntityType();
EdmMapping mapping = mock(EdmMapping.class);
when(roomType.getMapping()).thenReturn(mapping);
when(mapping.getMediaResourceSourceKey()).thenReturn(mediaResourceSourceKey);
when(mapping.getMediaResourceMimeTypeKey()).thenReturn(mediaResourceMimeTypeKey);
ODataResponse response = ser.writeEntry(roomsSet, localRoomData, DEFAULT_PROPERTIES);
String xmlString = verifyResponse(response);
assertXpathNotExists(
"/a:entry/a:link[@href=\"Rooms('1')/$value\" and" +
" @rel=\"edit-media\" and @type=\"image/jpeg\"]", xmlString);