// Path: 1.BasicExample/src/main/java/com/in28minutes/example/spring/model/Todo.java
// public class Todo {
// 
// 	private String desc;
// 	private Date date;
// 	private boolean isDone;
// 
// 	public Todo() {
// 		super();
// 	}
// 
// 	public Todo(String desc, Date date, boolean isDone) {
// 		this();
// 		this.desc = desc;
// 		this.date = date;
// 		this.isDone = isDone;
// 	}
// 
// 	public String getDesc() {
// 		return desc;
// 	}
// 
// 	public void setDesc(String desc) {
// 		this.desc = desc;
// 	}
// 
// 	public Date getDate() {
// 		return date;
// 	}
// 
// 	public void setDate(Date date) {
// 		this.date = date;
// 	}
// 
// 	public boolean isDone() {
// 		return isDone;
// 	}
// 
// 	public void setDone(boolean isDone) {
// 		this.isDone = isDone;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return String.format("Todo [desc=%s, date=%s, isDone=%s]", desc, date,
// 				isDone);
// 	}
// 
// }


import static org.junit.Assert.assertNotNull;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.oxm.Marshaller;
import org.springframework.oxm.Unmarshaller;
import org.springframework.oxm.XmlMappingException;
import org.springframework.oxm.castor.CastorMarshaller;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.in28minutes.example.spring.model.Todo;

package com.in28minutes.example.spring.business.xml;






@Configuration
@ComponentScan(basePackages = { "com.in28minutes.example.spring.business.xml" })
class SpringXmlContext {
	@Bean
	public Marshaller marshaller() {
		return new CastorMarshaller();
	}

	@Bean
	public Marshaller unmarshaller() {
		CastorMarshaller castorMarshaller = new CastorMarshaller();

// Path: 1.BasicExample/src/main/java/com/in28minutes/example/spring/model/Todo.java
// public class Todo {
// 
// 	private String desc;
// 	private Date date;
// 	private boolean isDone;
// 
// 	public Todo() {
// 		super();
// 	}
// 
// 	public Todo(String desc, Date date, boolean isDone) {
// 		this();
// 		this.desc = desc;
// 		this.date = date;
// 		this.isDone = isDone;
// 	}
// 
// 	public String getDesc() {
// 		return desc;
// 	}
// 
// 	public void setDesc(String desc) {
// 		this.desc = desc;
// 	}
// 
// 	public Date getDate() {
// 		return date;
// 	}
// 
// 	public void setDate(Date date) {
// 		this.date = date;
// 	}
// 
// 	public boolean isDone() {
// 		return isDone;
// 	}
// 
// 	public void setDone(boolean isDone) {
// 		this.isDone = isDone;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return String.format("Todo [desc=%s, date=%s, isDone=%s]", desc, date,
// 				isDone);
// 	}
// 
// }


// Path: 1.BasicExample/src/test/java/com/in28minutes/example/spring/business/xml/TodoXmlConversionTest.java
import static org.junit.Assert.assertNotNull;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.oxm.Marshaller;
import org.springframework.oxm.Unmarshaller;
import org.springframework.oxm.XmlMappingException;
import org.springframework.oxm.castor.CastorMarshaller;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.in28minutes.example.spring.model.Todo;

package com.in28minutes.example.spring.business.xml;






@Configuration
@ComponentScan(basePackages = { "com.in28minutes.example.spring.business.xml" })
class SpringXmlContext {
	@Bean
	public Marshaller marshaller() {
		return new CastorMarshaller();
	}

	@Bean
	public Marshaller unmarshaller() {
		CastorMarshaller castorMarshaller = new CastorMarshaller();

		castorMarshaller.setTargetClass(Todo.class);
