// Path: src/test/java/de/galan/verjson/test/MyContainer.java
// public class MyContainer {
// 
// 	TestBean bean;
// 
// 
// 	public MyContainer(TestBean bean) {
// 		this.bean = bean;
// 	}
// 
// }
// 
// Path: src/test/java/de/galan/verjson/test/TestBean.java
// public class TestBean {
// 
// 	public String content;
// 	public Long number;
// 	public Object unrecognized;
// 
// 
// 	public TestBean content(String value) {
// 		content = value;
// 		return this;
// 	}
// 
// 
// 	public TestBean number(Long value) {
// 		number = value;
// 		return this;
// 	}
// 
// 
// 	public TestBean unrecognized(Object obj) {
// 		unrecognized = obj;
// 		return this;
// 	}
// 
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hash(content, number);
// 	}
// 
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		return EqualsBuilder.reflectionEquals(this, obj, false);
// 	}
// 
// }


import static de.galan.commons.test.Tests.*;
import static org.assertj.core.api.Assertions.*;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import de.galan.commons.test.AbstractTestParent;
import de.galan.commons.time.ApplicationClock;
import de.galan.verjson.test.MyContainer;
import de.galan.verjson.test.TestBean;
package de.galan.verjson.core;







/**
 * CUT Verjson - plugging external serializer/deserializer into Verjson
 *
 * @author daniel
 */
public class VerjsonSerializerTest extends AbstractTestParent {

	private Verjson<MyContainer> verjson;


	@Before
	public void before() throws Exception {
		Versions versions = new Versions();
		versions.registerSerializer(new TestBeanSerializer());
		versions.registerDeserializer(new TestBeanDeserializer());
		verjson = new Verjson<MyContainer>(MyContainer.class, versions);
		ApplicationClock.setUtc("2014-05-06T06:42:28Z");
	}


	@Test
	public void testName() throws Exception {
// Path: src/test/java/de/galan/verjson/test/MyContainer.java
// public class MyContainer {
// 
// 	TestBean bean;
// 
// 
// 	public MyContainer(TestBean bean) {
// 		this.bean = bean;
// 	}
// 
// }
// 
// Path: src/test/java/de/galan/verjson/test/TestBean.java
// public class TestBean {
// 
// 	public String content;
// 	public Long number;
// 	public Object unrecognized;
// 
// 
// 	public TestBean content(String value) {
// 		content = value;
// 		return this;
// 	}
// 
// 
// 	public TestBean number(Long value) {
// 		number = value;
// 		return this;
// 	}
// 
// 
// 	public TestBean unrecognized(Object obj) {
// 		unrecognized = obj;
// 		return this;
// 	}
// 
// 
// 	@Override
// 	public int hashCode() {
// 		return Objects.hash(content, number);
// 	}
// 
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		return EqualsBuilder.reflectionEquals(this, obj, false);
// 	}
// 
// }


// Path: src/test/java/de/galan/verjson/core/VerjsonSerializerTest.java
import static de.galan.commons.test.Tests.*;
import static org.assertj.core.api.Assertions.*;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import de.galan.commons.test.AbstractTestParent;
import de.galan.commons.time.ApplicationClock;
import de.galan.verjson.test.MyContainer;
import de.galan.verjson.test.TestBean;

package de.galan.verjson.core;







/**
 * CUT Verjson - plugging external serializer/deserializer into Verjson
 *
 * @author daniel
 */
public class VerjsonSerializerTest extends AbstractTestParent {

	private Verjson<MyContainer> verjson;


	@Before
	public void before() throws Exception {
		Versions versions = new Versions();
		versions.registerSerializer(new TestBeanSerializer());
		versions.registerDeserializer(new TestBeanDeserializer());
		verjson = new Verjson<MyContainer>(MyContainer.class, versions);
		ApplicationClock.setUtc("2014-05-06T06:42:28Z");
	}


	@Test
	public void testName() throws Exception {
		String written = verjson.write(new MyContainer(new TestBean().number(123L).content("abc")));