@Test
public void writeGISElementContainerElementGISElementContainerXMLBuilderPathBuilderXMLResources() throws Exception {

	PathBuilder pathBuilder = new SimplePathBuilder();
	XMLResources res = new XMLResources(pathBuilder);
	ArrayMapElementLayer<MapPoint> container = new ArrayMapElementLayer(MapPoint.class);
	MapPoint pts1 = new MapPoint(3, 4);
	pts1.setName("name1"); //$NON-NLS-1$
	container.addMapElement(pts1);
	MapPoint pts2 = new MapPoint(34, 55);
	pts2.setName("name2"); //$NON-NLS-1$
	container.addMapElement(pts2);
	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 element = xmlBuilder.createElement("doc"); //$NON-NLS-1$
	doc.appendChild(element);
	XMLGISElementUtil.writeGISElementContainer(element, container, xmlBuilder, pathBuilder, res);
	String actual;
	try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
		XMLUtil.writeXML(doc, baos);
		baos.flush();
		actual = new String(baos.toByteArray());
	}
	final String id1 = pts1.getUUID().toString();
	final String id2 = pts2.getUUID().toString();
	final String expected = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" //$NON-NLS-1$
			+ "<doc elementGeometryProjection=\"FRANCE_LAMBERT_2_EXTENDED\"><elements>" //$NON-NLS-1$
			+ "<point doubleFrame=\"false\" geoId=\"39e072ec9ca6460ee679103fd10d53dc#3;4;3;4\" id=\"" //$NON-NLS-1$
			+ id1 + "\" name=\"name1\" size=\"0.3\" x=\"3.0\" y=\"4.0\"/>" //$NON-NLS-1$
			+ "<point doubleFrame=\"false\" geoId=\"68a29c8943226086e04c05f595e8e580#34;55;34;55\" id=\"" //$NON-NLS-1$
			+ id2 + "\" name=\"name2\" size=\"0.3\" x=\"34.0\" y=\"55.0\"/></elements></doc>"; //$NON-NLS-1$
	assertEquals(expected, actual);
}