// Path: src/main/java/pl/maciejwalkowiak/plist/handler/Handler.java
// public interface Handler {
// 	boolean supports(Object object);
// 	String handle(Object object);
// }
// 
// Path: src/main/java/pl/maciejwalkowiak/plist/strategy/UppercaseNamingStrategy.java
// public class UppercaseNamingStrategy implements NamingStrategy {
// 	public String fieldNameToKey(String toConvert) {
// 		return addUnderscores(toConvert).toUpperCase();
// 	}
// 
// 	protected static String addUnderscores(String name) {
// 		StringBuffer buf = new StringBuffer(name.replace('.', '_'));
// 		for (int i = 1; i < buf.length() - 1; i++) {
// 			if (
// 					Character.isLowerCase(buf.charAt(i - 1)) &&
// 							Character.isUpperCase(buf.charAt(i)) &&
// 							Character.isLowerCase(buf.charAt(i + 1))
// 					) {
// 				buf.insert(i++, '_');
// 			}
// 		}
// 		return buf.toString().toLowerCase();
// 	}
// }
// 
// Path: src/main/java/pl/maciejwalkowiak/plist/plisttypes/PlistData.java
// public class PlistData {
// 	private byte[] data;
// 	
// 	public PlistData(byte[] data) {
// 		this.data = data;
// 	}
// 	
// 	public byte[] getData() {
// 		return data;
// 	}
// }


import static org.fest.assertions.Assertions.assertThat;
import org.junit.Test;
import pl.maciejwalkowiak.plist.handler.Handler;
import pl.maciejwalkowiak.plist.strategy.UppercaseNamingStrategy;
import pl.maciejwalkowiak.plist.plisttypes.PlistData;
import java.math.BigDecimal;
import java.util.*;
		assertThat(plistSerializer.serialize(null)).isEqualTo("");
	}

	@Test
	public void testStaticFieldSerialization() {
		//given
		ClassWithStaticFields classWithStaticFields = new ClassWithStaticFields();

		//when
		String result = plistSerializer.serialize(classWithStaticFields);

		//then
		assertThat(result).isEqualTo("<dict><key>serializableField</key><integer>1</integer></dict>");
	}

	@Test
	public void testAnnotations() {
		//given
		ClassWithAnnotations classWithAnnotations = new ClassWithAnnotations();

		//when
		String xml = plistSerializer.serialize(classWithAnnotations);

		//then
		assertThat(xml).isEqualTo("<dict><key>trick</key><string>i am renamed</string></dict>");
	}

	@Test
	public void testPlistRenameWithFollowingStrategy() {
		//given
// Path: src/main/java/pl/maciejwalkowiak/plist/handler/Handler.java
// public interface Handler {
// 	boolean supports(Object object);
// 	String handle(Object object);
// }
// 
// Path: src/main/java/pl/maciejwalkowiak/plist/strategy/UppercaseNamingStrategy.java
// public class UppercaseNamingStrategy implements NamingStrategy {
// 	public String fieldNameToKey(String toConvert) {
// 		return addUnderscores(toConvert).toUpperCase();
// 	}
// 
// 	protected static String addUnderscores(String name) {
// 		StringBuffer buf = new StringBuffer(name.replace('.', '_'));
// 		for (int i = 1; i < buf.length() - 1; i++) {
// 			if (
// 					Character.isLowerCase(buf.charAt(i - 1)) &&
// 							Character.isUpperCase(buf.charAt(i)) &&
// 							Character.isLowerCase(buf.charAt(i + 1))
// 					) {
// 				buf.insert(i++, '_');
// 			}
// 		}
// 		return buf.toString().toLowerCase();
// 	}
// }
// 
// Path: src/main/java/pl/maciejwalkowiak/plist/plisttypes/PlistData.java
// public class PlistData {
// 	private byte[] data;
// 	
// 	public PlistData(byte[] data) {
// 		this.data = data;
// 	}
// 	
// 	public byte[] getData() {
// 		return data;
// 	}
// }


// Path: src/test/java/pl/maciejwalkowiak/plist/PlistSerializerImplTest.java
import static org.fest.assertions.Assertions.assertThat;
import org.junit.Test;
import pl.maciejwalkowiak.plist.handler.Handler;
import pl.maciejwalkowiak.plist.strategy.UppercaseNamingStrategy;
import pl.maciejwalkowiak.plist.plisttypes.PlistData;
import java.math.BigDecimal;
import java.util.*;

		assertThat(plistSerializer.serialize(null)).isEqualTo("");
	}

	@Test
	public void testStaticFieldSerialization() {
		//given
		ClassWithStaticFields classWithStaticFields = new ClassWithStaticFields();

		//when
		String result = plistSerializer.serialize(classWithStaticFields);

		//then
		assertThat(result).isEqualTo("<dict><key>serializableField</key><integer>1</integer></dict>");
	}

	@Test
	public void testAnnotations() {
		//given
		ClassWithAnnotations classWithAnnotations = new ClassWithAnnotations();

		//when
		String xml = plistSerializer.serialize(classWithAnnotations);

		//then
		assertThat(xml).isEqualTo("<dict><key>trick</key><string>i am renamed</string></dict>");
	}

	@Test
	public void testPlistRenameWithFollowingStrategy() {
		//given
		PlistSerializerImpl plistSerializer = new PlistSerializerImpl(new UppercaseNamingStrategy());