package com.levelup.java.date;

import static org.junit.Assert.assertNotNull;

import java.util.GregorianCalendar;

import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;

import org.junit.Test;

/**
 * This java example will demonstrate converting a date to XMLGregorianCalendar
 * 
 * @author Justin Musgrove
 * @see <a href='http://www.leveluplunch.com/java/examples/date-to-xmlgregoriancalendar/'>Date to XMLGregorianCalendar</a>
 * 
 */
public class DateToXMLGregorianCalendar {

	
	@Test
	public void convert_date_to_XMLGregorianCalendar () throws DatatypeConfigurationException { 

		GregorianCalendar gCalendar = new GregorianCalendar();

		XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(gCalendar);
		
		assertNotNull(xmlGregorianCalendar);
	}
	
}

@@ -274,18 +274,110 @@
 org.
-junit.Test
+apache.log4j.Logger;%0Aimport org.junit.Test;%0A%0Aimport com.levelup.java.date.format.PredefinedDateFormats
 ;%0A%0A/
@@ -664,16 +664,106 @@
 ndar %7B%0A%0A
+%09private static final Logger logger = Logger.getLogger(DateToXMLGregorianCalendar.class);%0A
 %09%0A%09@Test
@@ -816,12 +816,14 @@
 ndar
- 
 ()
- 
+%0A%09%09%09
 thro
@@ -857,17 +857,16 @@
 eption %7B
- 
 %0A%0A%09%09Greg
@@ -978,16 +978,21 @@
 eFactory
+%0A%09%09%09%09
 .newInst
@@ -1034,18 +1034,54 @@
 endar);%0A
+%0A
 %09%09
+logger.info(xmlGregorianCalendar);%0A
 %0A%09%09asser

format add logger