Index: /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestMultipleStyles.java
===================================================================
--- /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestMultipleStyles.java	(revision 95)
+++ /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestMultipleStyles.java	(revision 96)
@@ -1,5 +1,19 @@
 package sapience.features.streams.kml;
 
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.geospatial.kml.Document;
+import org.geospatial.kml.Folder;
+import org.geospatial.kml.KML;
+import org.geospatial.kml.KMLContainer;
+import org.geospatial.kml.KMLFeature;
+import org.geospatial.kml.Placemark;
+import org.junit.Before;
 import org.junit.Test;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.QNameMap;
+import com.thoughtworks.xstream.io.xml.StaxDriver;
 
 import sapience.features.FeatureCollection;
@@ -8,16 +22,25 @@
 public class TestMultipleStyles {
 
-	String name = "samples/MultipleStyles.kml";
+	String file = "samples/MultipleStyles.kml";
 	
+	private XStream xstream;
+	
+	@Before
+	public void prepareParser() {
+		QNameMap qnameMap = new QNameMap();
+		qnameMap.setDefaultNamespace("http://www.example.com/");
+		xstream = new XStream(new StaxDriver(qnameMap));
+		new XStreamsConfiguration().configure(xstream);
+		
+
+	}
 
 	@Test
-	public void parse() throws Exception {
-		Streams parser = new KMLStream();
-		FeatureCollection kml = parser.read(this.getClass().getResourceAsStream(name));
+	public void parse() throws IOException {
+		InputStream is = this.getClass().getResourceAsStream(file);
 		
-		// should have two MapStyles
-		 
-		// should have three Style Definitions
-		parser.write(kml, System.out);
+		KML doc = (KML) xstream.fromXML(is);
+		
+		System.out.println(xstream.toXML(doc));
 	}
 
Index: /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestEasy.java
===================================================================
--- /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestEasy.java	(revision 95)
+++ /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestEasy.java	(revision 96)
@@ -1,54 +1,74 @@
 package sapience.features.streams.kml;
 
-import java.io.File;
+import java.io.ByteArrayOutputStream;
+import java.io.FileInputStream;
 import java.io.IOException;
-import java.util.List;
+import java.io.OutputStream;
 
-import org.geospatial.kml.Document;
-import org.geospatial.kml.KML;
-import org.geospatial.kml.KMLFeature;
-import org.junit.Assert;
+import junit.framework.Assert;
+
+import org.apache.commons.io.IOUtils;
+import org.junit.Before;
 import org.junit.Test;
 
-import sapience.features.Feature;
+
+import sapience.annotations.model.Name;
 import sapience.features.FeatureCollection;
 import sapience.features.streams.Streams;
-import sapience.features.streams.kml.KMLStream;
 
 public class TestEasy {
 
-	String file = "samples/easy.kml";
+	String in = "samples/easy.kml";
+	String out = "samples/easy.out.kml";
 	
-	@Test
-	public void parseEasy() throws IOException {
-		Streams s = new KMLStream();
-		FeatureCollection res = s.read(this.getClass().getResourceAsStream(file));
-
-		
-		
-//		KML kml = parser.start();
-//
-//		Assert.assertNotNull(kml);
-//		
-//		List<Document> documents = kml.getDocuments();
-//		
-//		
-//		for(Document f : documents) {
-//			List<KMLFeature> l = f.listFeaturesRecursive();
-//			System.out.println(l.size());
-//			
-//			for(KMLFeature kf : l) {
-//				System.out.print(kf.getClass());
-//				System.out.print(" :: ");
-//				System.out.println(kf.getName());
-//			}
-//		}
+	private FeatureCollection res;
+	private Streams streams;
+	
+	@Before
+	public void parse() throws IOException {
+		streams = new KMLStream();
+		res = streams.read(this.getClass().getResourceAsStream(in));
 	}
 	
 	@Test
+	public void testNumberOfFeatures() throws IOException {
+		// number of features
+		Assert.assertEquals(6, res.listFeaturesRecursively().size());
+	}
+	
+	@Test
+	public void testAnnotation() {
+		// name of second folder
+		// we don't which one, but one of both has to (order can change)
+		String f0 = res.getFeature(0).getAnnotation(Name.class);
+		String f1 = res.getFeature(1).getAnnotation(Name.class);
+		Assert.assertTrue(f0.equalsIgnoreCase("Folder B") || f1.equalsIgnoreCase("Folder B")); 
+		
+	}
+	
+	// test removed, will always fail, since the order of always changes (you have to 
+	// check the content, not the XML
 	public void writeEasy() throws IOException {
-		Streams s = new KMLStream();
-		FeatureCollection res = s.read(this.getClass().getResourceAsStream(file));
-		s.write(res, System.out);
+		OutputStream os = new OutputStream() {
+			StringBuffer sb = new StringBuffer();
+			@Override
+			public void write(int b) throws IOException {
+				sb.append((char) b);
+			}
+			
+			public String toString() {
+				return sb.toString();
+			}
+		};
+		
+		streams.write(res, os);
+		
+		String expected = IOUtils.toString(this.getClass().getResourceAsStream(out));
+		String actual = os.toString();
+		
+		System.out.println(expected.trim());
+		System.out.println(actual.trim());
+		
 	}
+	
 }
Index: /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestNestedFolders.java
===================================================================
--- /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestNestedFolders.java	(revision 95)
+++ /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestNestedFolders.java	(revision 96)
@@ -2,6 +2,18 @@
 
 import java.io.IOException;
+import java.io.InputStream;
 
+import org.geospatial.kml.Document;
+import org.geospatial.kml.Folder;
+import org.geospatial.kml.KML;
+import org.geospatial.kml.KMLContainer;
+import org.geospatial.kml.KMLFeature;
+import org.geospatial.kml.Placemark;
+import org.junit.Before;
 import org.junit.Test;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.QNameMap;
+import com.thoughtworks.xstream.io.xml.StaxDriver;
 
 import sapience.features.FeatureCollection;
@@ -11,9 +23,34 @@
 
 	String file = "samples/NestedFolders.kml";
+	private XStream xstream;
 	
+	@Before
+	public void prepareParser() {
+		QNameMap qnameMap = new QNameMap();
+		qnameMap.setDefaultNamespace("http://www.example.com/");
+		xstream = new XStream(new StaxDriver(qnameMap));
+		this.configure();
+		
+
+	}
+	
+	private void configure() {
+		xstream.processAnnotations(KML.class);
+		
+		xstream.processAnnotations(KMLContainer.class);
+		xstream.processAnnotations(Document.class);
+		xstream.processAnnotations(Folder.class);
+		xstream.processAnnotations(KMLFeature.class);
+		xstream.processAnnotations(Placemark.class);
+		
+	}
+
 	@Test
 	public void parse() throws IOException {
-		Streams s = new KMLStream();
-		FeatureCollection res = s.read(this.getClass().getResourceAsStream(file));
+		InputStream is = this.getClass().getResourceAsStream(file);
+		
+		KML doc = (KML) xstream.fromXML(is);
+		
+		System.out.println(xstream.toXML(doc));
 	}
 }
Index: /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestAnnotatedSamples.java
===================================================================
--- /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestAnnotatedSamples.java	(revision 95)
+++ /spatial.streams.kml/src/test/java/sapience/features/streams/kml/TestAnnotatedSamples.java	(revision 96)
@@ -8,5 +8,5 @@
 import org.junit.Test;
 
-import sapience.annotations.model.contact.Name;
+import sapience.annotations.model.Name;
 import sapience.features.FeatureCollection;
 import sapience.features.streams.Streams;
Index: /spatial.streams.kml/src/test/java/testing/Parser.java
===================================================================
--- /spatial.streams.kml/src/test/java/testing/Parser.java	(revision 95)
+++ /spatial.streams.kml/src/test/java/testing/Parser.java	(revision 96)
@@ -23,5 +23,5 @@
 		this.configure();
 		
-		InputStream is = this.getClass().getResourceAsStream("example.xml");
+		InputStream is = this.getClass().getResourceAsStream("Example.xml");
 		
 		Document doc = (Document) xstream.fromXML(is);
Index: /spatial.streams.kml/src/test/resources/sapience/features/streams/kml/samples/NestedFolders.kml
===================================================================
--- /spatial.streams.kml/src/test/resources/sapience/features/streams/kml/samples/NestedFolders.kml	(revision 95)
+++ /spatial.streams.kml/src/test/resources/sapience/features/streams/kml/samples/NestedFolders.kml	(revision 96)
@@ -9,13 +9,9 @@
 			<Placemark>
 				<name>Point A.A</name>
-				<Point>
-					<coordinates>8.922092297639281,52.28729651710943,0</coordinates>
-				</Point>
+
 			</Placemark>
 			<Placemark>
 				<name>Point A.B</name>
-				<Point>
-					<coordinates>9.922092297639281,52.28729651710943,0</coordinates>
-				</Point>
+
 			</Placemark>
 
@@ -27,25 +23,17 @@
 			<Placemark>
 				<name>Point B.A</name>
-				<Point>
-					<coordinates>8.922092297639281,52.28729651710943,0</coordinates>
-				</Point>
+	
 			</Placemark>
 			<Placemark>
 				<name>Point B.B</name>
-				<Point>
-					<coordinates>8.922092297639281,52.28729651710943,0</coordinates>
-				</Point>
+			
 			</Placemark>
 			<Placemark>
 				<name>Point A.C</name>
-				<Point>
-					<coordinates>10.922092297639281,52.28729651710943,0</coordinates>
-				</Point>
+		
 			</Placemark>
 			<Placemark>
 				<name>Point A.D</name>
-				<Point>
-					<coordinates>11.922092297639281,52.28729651710943,0</coordinates>
-				</Point>
+			
 			</Placemark>
 		</Folder>
Index: /spatial.streams.kml/src/main/java/org/geospatial/kml/KMLFeature.java
===================================================================
--- /spatial.streams.kml/src/main/java/org/geospatial/kml/KMLFeature.java	(revision 95)
+++ /spatial.streams.kml/src/main/java/org/geospatial/kml/KMLFeature.java	(revision 96)
@@ -36,5 +36,4 @@
 	@XStreamAlias("LookAt")
 	private LookAt lookAt;
-
 
 	@XStreamAlias("styleUrl")
Index: /spatial.streams.kml/src/main/java/sapience/features/streams/factories/KMLFactory.java
===================================================================
--- /spatial.streams.kml/src/main/java/sapience/features/streams/factories/KMLFactory.java	(revision 95)
+++ /spatial.streams.kml/src/main/java/sapience/features/streams/factories/KMLFactory.java	(revision 96)
@@ -19,12 +19,21 @@
 import sapience.annotations.model.Description;
 import sapience.annotations.model.KeyValueProperty;
+import sapience.annotations.model.Name;
 import sapience.annotations.model.contact.Address;
-import sapience.annotations.model.contact.Name;
 import sapience.features.Feature;
 import sapience.features.FeatureCollection;
+import sapience.features.factories.FeatureFactory;
 
 
 import com.vividsolutions.jts.geom.Geometry;
 
+/**
+ * TODO: not finished
+ * 
+ * Creates a {@link KML} object from a {@link FeatureCollection}
+ * 
+ * @author pajoma
+ *
+ */
 public class KMLFactory {
 
@@ -61,5 +70,5 @@
 	public KML buildKML(FeatureCollection coll) throws IOException {
 		kml = new KML();
-		kml.addDocument((Document) populateContainer(new Document(), coll));
+		kml.setFeature((Document) populateContainer(new Document(), coll));
 		
 		return kml;
@@ -81,5 +90,5 @@
 			if(fc.getAssociatedFeatureCollection() == null) {
 				Document doc = (Document) populateContainer(new Document(), fc);
-				kml.addDocument(doc);
+				kml.setFeature(doc);
 				
 				// now we have to find all containers which have this document as container
