public void writeValidMetadata3() throws Exception {
List<Schema> schemas = new ArrayList<Schema>();
List<AnnotationElement> annotationElements = new ArrayList<AnnotationElement>();
annotationElements.add(new AnnotationElement().setName("test").setText("hallo)"));
Schema schema = new Schema().setAnnotationElements(annotationElements);
schema.setNamespace("http://namespace.com");
schemas.add(schema);
List<PropertyRef> keys = new ArrayList<PropertyRef>();
keys.add(new PropertyRef().setName("Id"));
Key key = new Key().setKeys(keys);
List<Property> properties = new ArrayList<Property>();
properties.add(new SimpleProperty().setName("Id").setType(EdmSimpleTypeKind.String));
EntityType entityType = new EntityType().setName("testType").setKey(key).setProperties(properties);
List<EntityType> entityTypes = new ArrayList<EntityType>();
entityTypes.add(entityType);
schema.setEntityTypes(entityTypes);
DataServices data = new DataServices().setSchemas(schemas).setDataServiceVersion(ODataServiceVersion.V20);
OutputStreamWriter writer = null;
CircleStreamBuffer csb = new CircleStreamBuffer();
writer = new OutputStreamWriter(csb.getOutputStream(), "UTF-8");