String mediaResourceMimeTypeKey = "~type";
roomData.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 = new JsonEntityProvider().writeEntry(roomsSet, roomData, DEFAULT_PROPERTIES);
String jsonString = verifyResponse(response);
Gson gson = new Gson();
StringMap<Object> jsonMap = gson.fromJson(jsonString, StringMap.class);