}
@Test
public void serializeAtomMediaResourceWithMimeType() throws IOException, XpathException, SAXException,
XMLStreamException, FactoryConfigurationError, ODataException {
AtomEntityProvider ser = createAtomEntityProvider();
EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).build();
Map<String, Object> localEmployeeData = new HashMap<String, Object>();
Calendar date = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
date.clear();
date.set(1999, 0, 1);
localEmployeeData.put("EmployeeId", "1");
localEmployeeData.put("ImmageUrl", null);
localEmployeeData.put("ManagerId", "1");
localEmployeeData.put("Age", new Integer(52));
localEmployeeData.put("RoomId", "1");
localEmployeeData.put("EntryDate", date);
localEmployeeData.put("TeamId", "42");
localEmployeeData.put("EmployeeName", "Walter Winter");
localEmployeeData.put("getImageType", "abc");
Map<String, Object> locationData = new HashMap<String, Object>();
Map<String, Object> cityData = new HashMap<String, Object>();
cityData.put("PostalCode", "33470");
cityData.put("CityName", "Duckburg");
locationData.put("City", cityData);
locationData.put("Country", "Calisota");
localEmployeeData.put("Location", locationData);
ODataResponse response =
ser.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
localEmployeeData,
properties);
String xmlString = verifyResponse(response);
assertXpathExists("/a:entry", xmlString);