@Test
public void writeGISElementContainerElementGISElementContainerXMLBuilderPathBuilderXMLResources_shp() throws Exception {

	PathBuilder pathBuilder = new SimplePathBuilder();
	XMLResources res = new XMLResources(pathBuilder);
	ArrayMapElementLayer<MapPoint> container = new ArrayMapElementLayer(MapPoint.class);
	container.setElementGeometrySource(new URL("file:/path/to/file.shp"), MapMetricProjection.FRANCE_LAMBERT_2); //$NON-NLS-1$
	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 expected = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" //$NON-NLS-1$
			+ "<doc elementGeometryProjection=\"FRANCE_LAMBERT_2\" elementGeometryUrl=\"#resource0\"/>"; //$NON-NLS-1$
	assertEquals(expected, actual);
	if (OperatingSystem.WIN.isCurrentOS()) {
		assertEquals("file:/" + FileSystem.getUserHomeDirectoryName().replaceAll("\\\\",  "/") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
				+ "//path/to/file.shp", res.getResourceURL(0).toExternalForm()); //$NON-NLS-1$
	} else {
		assertEquals("file:/path/to/file.shp", res.getResourceURL(0).toExternalForm()); //$NON-NLS-1$
	}
}