}
@Test(expected = ConversionException.class)
public void testConversionWithNullCharacterInMap() throws ConversionException {
MongoConnector mdc = mongoConnectorResource.getConnector();
LocalDocument ld = new LocalDocument();
Map<String, Object> map = new HashMap<String, Object>();
map.put("NUL \u0000 here", "");
ld.putContentField("field", map);
try {
mdc.convert(ld);
} catch (ConversionException e) {
map.clear();
map.put("nulvalue", "the \u0000 value");
ld.putContentField("field", map);
mdc.convert(ld);
}
fail("Was able to put in a map with a null in a field name");
}