### Question:
XFieldNameMapper { public String mapXField(XField xField) { Preconditions.checkNotNull(xField); String fieldName = fieldNamesMappings.get(xField); if (fieldName == null) { throw new IllegalArgumentException("No field mapping found for " + xField.name()); } return fieldName; }  String mapXField(XField xField); @Resource void setFieldNamesMappings(Map<XField, String> fieldNamesMappings);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void mapXField_MAPPING_NOT_FOUND() { xFieldNameMapper.mapXField(XField.JUDGMENT_DATE); }
@Test(expected = NullPointerException.class) public void mapXField_MAPPING_NULL_XFIELD() { xFieldNameMapper.mapXField(null); }