// Path: src/main/java/net/davidtanzer/jobjectformatter/valuesinfo/GroupedValuesInfo.java
// public class GroupedValuesInfo {
// 	private final String groupName;
// 	private final List<ValueInfo> values;
// 
// 	private GroupedValuesInfo(final String groupName, final List<ValueInfo> values) {
// 		this.groupName = groupName;
// 		this.values = values;
// 	}
// 
// 	/**
// 	 * Get the name of the group.
// 	 *
// 	 * @return the name of the group.
// 	 */
// 	public String getGroupName() {
// 		return groupName;
// 	}
// 
// 	/**
// 	 * Get all values of the group as {@link net.davidtanzer.jobjectformatter.valuesinfo.ValueInfo}.
// 	 *
// 	 * @return all values of the group as {@link net.davidtanzer.jobjectformatter.valuesinfo.ValueInfo}.
// 	 */
// 	public List<ValueInfo> getValues() {
// 		return values;
// 	}
// 
// 	/**
// 	 * A builder to create GroupedValuesInfo objects.
// 	 */
// 	public static class Builder {
// 		private String groupName;
// 		private final List<ValueInfo> values = new ArrayList<>();
// 
// 		/**
// 		 * Build the grouped values info from the information provided before calling this method.
// 		 *
// 		 * <strong>Do not use the builder after calling this method!</strong>
// 		 *
// 		 * @return The newly created GroupedValuesInfo.
// 		 */
// 		public GroupedValuesInfo buildGroupedValuesInfo() {
// 			return new GroupedValuesInfo(groupName, Collections.unmodifiableList(values));
// 		}
// 
// 		/**
// 		 * Set the class name for the grouped values info.
// 		 *
// 		 * @param className the class name for the grouped values info.
// 		 * @return the builder itself.
// 		 */
// 		public Builder setClassName(final String className) {
// 			this.groupName = className;
// 			return this;
// 		}
// 
// 		/**
// 		 * Add a field value to the grouped values info.
// 		 * @param name the name of the field.
// 		 * @param formattedFieldValue the formatted value of the field.
// 		 * @param fieldClass The class of the field.
// 		 * @return the builder itself.
// 		 */
// 		public Builder addFieldValue(final String name, final Object formattedFieldValue, final Class<?> fieldClass) {
// 			values.add(new ValueInfo(name, formattedFieldValue, fieldClass));
// 			return this;
// 		}
// 	}
// }
// 
// Path: src/main/java/net/davidtanzer/jobjectformatter/valuesinfo/ObjectValuesInfo.java
// public class ObjectValuesInfo {
// 	private final List<GroupedValuesInfo> valuesByClass;
// 	private final List<ValueInfo> allValues;
// 	private final Class type;
// 
// 	private ObjectValuesInfo(final List<GroupedValuesInfo> valuesByClass, final List<ValueInfo> allValues, final Class type) {
// 		this.valuesByClass = valuesByClass;
// 		this.allValues = allValues;
// 		this.type = type;
// 	}
// 
// 	/**
// 	 * Get all values of the object's properties, grouped by their declaring class.
// 	 *
// 	 * @return all values of the object's properties, grouped by their declaring class.
// 	 */
// 	public List<GroupedValuesInfo> getValuesByClass() {
// 		return valuesByClass;
// 	}
// 
// 	/**
// 	 * Get all values of the object's properties.
// 	 *
// 	 * @return all values of the object's properties.
// 	 */
// 	public List<ValueInfo> getAllValues() {
// 		return allValues;
// 	}
// 
// 	/**
// 	 * Get the type of the object to format.
// 	 *
// 	 * @return the type of the object to format.
// 	 */
// 	public Class getType() {
// 		return type;
// 	}
// 
// 	static class Builder {
// 		private final List<GroupedValuesInfo> valuesByClass = new ArrayList<>();
// 		private final List<ValueInfo> allValues = new ArrayList<>();
// 		private Class type;
// 
// 		public ObjectValuesInfo buildToStringInfo() {
// 			return new ObjectValuesInfo(
// 					Collections.unmodifiableList(valuesByClass),
// 					Collections.unmodifiableList(allValues),
// 					type);
// 		}
// 
// 		Builder addClassValues(final GroupedValuesInfo groupedValuesInfo) {
// 			valuesByClass.add(groupedValuesInfo);
// 			allValues.addAll(groupedValuesInfo.getValues());
// 			return this;
// 		}
// 
// 		Builder setType(Class type) {
// 			this.type = type;
// 			return this;
// 		}
// 	}
// }


import net.davidtanzer.jobjectformatter.valuesinfo.GroupedValuesInfo;
import net.davidtanzer.jobjectformatter.valuesinfo.ObjectValuesInfo;
import org.junit.Before;
import org.junit.Test;
import java.util.Arrays;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/*
   Copyright 2015 David Tanzer (business@davidtanzer.net / @dtanzer)

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package net.davidtanzer.jobjectformatter.formatter;




public class JsonObjectStringFormatterTest {
	@Before
	public void setup() throws Exception {
	}

	@Test
	public void formatsGroupedByClassesCorrectly() {
		final JsonObjectStringFormatter formatter = new JsonObjectStringFormatter();
// Path: src/main/java/net/davidtanzer/jobjectformatter/valuesinfo/GroupedValuesInfo.java
// public class GroupedValuesInfo {
// 	private final String groupName;
// 	private final List<ValueInfo> values;
// 
// 	private GroupedValuesInfo(final String groupName, final List<ValueInfo> values) {
// 		this.groupName = groupName;
// 		this.values = values;
// 	}
// 
// 	/**
// 	 * Get the name of the group.
// 	 *
// 	 * @return the name of the group.
// 	 */
// 	public String getGroupName() {
// 		return groupName;
// 	}
// 
// 	/**
// 	 * Get all values of the group as {@link net.davidtanzer.jobjectformatter.valuesinfo.ValueInfo}.
// 	 *
// 	 * @return all values of the group as {@link net.davidtanzer.jobjectformatter.valuesinfo.ValueInfo}.
// 	 */
// 	public List<ValueInfo> getValues() {
// 		return values;
// 	}
// 
// 	/**
// 	 * A builder to create GroupedValuesInfo objects.
// 	 */
// 	public static class Builder {
// 		private String groupName;
// 		private final List<ValueInfo> values = new ArrayList<>();
// 
// 		/**
// 		 * Build the grouped values info from the information provided before calling this method.
// 		 *
// 		 * <strong>Do not use the builder after calling this method!</strong>
// 		 *
// 		 * @return The newly created GroupedValuesInfo.
// 		 */
// 		public GroupedValuesInfo buildGroupedValuesInfo() {
// 			return new GroupedValuesInfo(groupName, Collections.unmodifiableList(values));
// 		}
// 
// 		/**
// 		 * Set the class name for the grouped values info.
// 		 *
// 		 * @param className the class name for the grouped values info.
// 		 * @return the builder itself.
// 		 */
// 		public Builder setClassName(final String className) {
// 			this.groupName = className;
// 			return this;
// 		}
// 
// 		/**
// 		 * Add a field value to the grouped values info.
// 		 * @param name the name of the field.
// 		 * @param formattedFieldValue the formatted value of the field.
// 		 * @param fieldClass The class of the field.
// 		 * @return the builder itself.
// 		 */
// 		public Builder addFieldValue(final String name, final Object formattedFieldValue, final Class<?> fieldClass) {
// 			values.add(new ValueInfo(name, formattedFieldValue, fieldClass));
// 			return this;
// 		}
// 	}
// }
// 
// Path: src/main/java/net/davidtanzer/jobjectformatter/valuesinfo/ObjectValuesInfo.java
// public class ObjectValuesInfo {
// 	private final List<GroupedValuesInfo> valuesByClass;
// 	private final List<ValueInfo> allValues;
// 	private final Class type;
// 
// 	private ObjectValuesInfo(final List<GroupedValuesInfo> valuesByClass, final List<ValueInfo> allValues, final Class type) {
// 		this.valuesByClass = valuesByClass;
// 		this.allValues = allValues;
// 		this.type = type;
// 	}
// 
// 	/**
// 	 * Get all values of the object's properties, grouped by their declaring class.
// 	 *
// 	 * @return all values of the object's properties, grouped by their declaring class.
// 	 */
// 	public List<GroupedValuesInfo> getValuesByClass() {
// 		return valuesByClass;
// 	}
// 
// 	/**
// 	 * Get all values of the object's properties.
// 	 *
// 	 * @return all values of the object's properties.
// 	 */
// 	public List<ValueInfo> getAllValues() {
// 		return allValues;
// 	}
// 
// 	/**
// 	 * Get the type of the object to format.
// 	 *
// 	 * @return the type of the object to format.
// 	 */
// 	public Class getType() {
// 		return type;
// 	}
// 
// 	static class Builder {
// 		private final List<GroupedValuesInfo> valuesByClass = new ArrayList<>();
// 		private final List<ValueInfo> allValues = new ArrayList<>();
// 		private Class type;
// 
// 		public ObjectValuesInfo buildToStringInfo() {
// 			return new ObjectValuesInfo(
// 					Collections.unmodifiableList(valuesByClass),
// 					Collections.unmodifiableList(allValues),
// 					type);
// 		}
// 
// 		Builder addClassValues(final GroupedValuesInfo groupedValuesInfo) {
// 			valuesByClass.add(groupedValuesInfo);
// 			allValues.addAll(groupedValuesInfo.getValues());
// 			return this;
// 		}
// 
// 		Builder setType(Class type) {
// 			this.type = type;
// 			return this;
// 		}
// 	}
// }


// Path: src/test/java/net/davidtanzer/jobjectformatter/formatter/JsonObjectStringFormatterTest.java
import net.davidtanzer.jobjectformatter.valuesinfo.GroupedValuesInfo;
import net.davidtanzer.jobjectformatter.valuesinfo.ObjectValuesInfo;
import org.junit.Before;
import org.junit.Test;
import java.util.Arrays;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

/*
   Copyright 2015 David Tanzer (business@davidtanzer.net / @dtanzer)

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package net.davidtanzer.jobjectformatter.formatter;




public class JsonObjectStringFormatterTest {
	@Before
	public void setup() throws Exception {
	}

	@Test
	public void formatsGroupedByClassesCorrectly() {
		final JsonObjectStringFormatter formatter = new JsonObjectStringFormatter();
		final GroupedValuesInfo classInfo = new GroupedValuesInfo.Builder()