@Test
	public void testConvertToDataNode() throws FileNotFoundException {
		try {
			InputStream inputStream = new FileInputStream(new File("xml/example.xml"));
			NodeList nodes = source.getXMLNodes(inputStream);
			Node parent = nodes.item(0);
			NodeList realList = parent.getChildNodes();

			for (int i = 0; i < realList.getLength(); ++i) {
				Node node = realList.item(i);

				if (node.getNodeType() == Node.ELEMENT_NODE) {
					DataNode dataNode = source.convertToDataNode(node);

					assertFalse("Data node must exists", dataNode == null);
					assertTrue("The node name has to be equal", dataNode
							.getName().equals(node.getNodeName()));

					// Test the attributes
					NamedNodeMap attributes = node.getAttributes();

					if (attributes != null) {
						for (int a = 0; i < attributes.getLength(); ++a) {
							Node attribute = attributes.item(a);

							if (attribute.getNodeType() == Node.ATTRIBUTE_NODE) {
								String key = attribute.getNodeName();
								String value = attribute.getNodeValue();
								String dataAttribute = dataNode
										.getAttribute(key);
								assertTrue("Attribute '" + key
										+ "' with value='" + value
										+ "' must exist in data node object",
										dataAttribute.equals(value));
								
							}
						}
					}
				}
			}
		} catch (ResourceException e) {
			fail(e.getMessage());
		}
	}