@Test
public void writeMapElementMapElementXMLBuilderXMLResources() throws Exception {

	PathBuilder pathBuilder = new SimplePathBuilder();
	XMLResources res = new XMLResources(pathBuilder);
	MapPoint point = new MapPoint(3, 4);
	point.setName("name1"); //$NON-NLS-1$
	point.setAttribute("attr1", "Text"); //$NON-NLS-1$ //$NON-NLS-2$
	DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
	DocumentBuilder builder = factory.newDocumentBuilder();
	Document doc = builder.newDocument();
	XMLBuilder xmlBuilder = new XMLBuilder() {
		@Override
		public Document getDocument() throws DOMException {
			return doc;
		}
	};
	Element node = XMLGISElementUtil.writeMapElement(point, xmlBuilder, res);
	String actual;
	try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
		XMLUtil.writeXML(node, baos);
		baos.flush();
		actual = new String(baos.toByteArray());
	}
	final String id = point.getUUID().toString();
	final String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" //$NON-NLS-1$
			+ "<point doubleFrame=\"false\" geoId=\"39e072ec9ca6460ee679103fd10d53dc#3;4;3;4\" " //$NON-NLS-1$
			+ "id=\"" + id + "\" name=\"name1\" size=\"0.3\" x=\"3.0\" y=\"4.0\">" //$NON-NLS-1$ //$NON-NLS-2$
			+ "<attributes><attribute name=\"attr1\" type=\"STRING\" value=\"Text\"/></attributes>" //$NON-NLS-1$
			+ "</point>"; //$NON-NLS-1$
	assertEquals(expected, actual);
}