// Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
//     public AllTypes()
//     {
//         super();
//         // You must not modify this constructor. Mithra calls this internally.
//         // You can call this constructor. You can also add new constructors.
//     }
// }
// 
// Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
//         extends CustomerAbstract
// {
// 	public Customer()
// 	{
// 		super();
// 		// You must not modify this constructor. Mithra calls this internally.
// 		// You can call this constructor. You can also add new constructors.
// 	}
// 
//     // Added as a convenience, particularly for ExercisesCrud questions 4, 7, & 8
// 	public Customer(final String name, final String country)
// 	{
// 		this();
// 		this.setName(name);
//         this.setCountry(country);
// 	}
// 
//     @Override
//     public String toString()
//     {
//         return "Customer[id=" + this.getCustomerId() + "; name=" + this.getName() + "; country=" + this.getCountry() + ']';
//     }
// }
// 
// Path: main-kata/src/main/java/kata/domain/CustomerAccount.java
// public class CustomerAccount
//         extends CustomerAccountAbstract
// {
// 	public CustomerAccount()
// 	{
// 		super();
// 		// You must not modify this constructor. Mithra calls this internally.
// 		// You can call this constructor. You can also add new constructors.
// 	}
// }
// 
// Path: main-kata/src/main/java/kata/domain/CustomerAccountList.java
// public class CustomerAccountList
//         extends CustomerAccountListAbstract
// {
// 	public CustomerAccountList()
// 	{
// 		super();
// 	}
// 
// 	public CustomerAccountList(int initialSize)
// 	{
// 		super(initialSize);
// 	}
// 
// 	public CustomerAccountList(Collection c)
// 	{
// 		super(c);
// 	}
// 
// 	public CustomerAccountList(Operation operation)
// 	{
// 		super(operation);
// 	}
// }
// 
// Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
//         extends PersonAbstract
// {
//     // Added for ExercisesAdvancedFinder question 9
//     public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
//     {
//         public void value(Person person)
//         {
//             person.incrementAge();
//         }
//     };
// 
// 	public Person()
// 	{
// 		super();
// 		// You must not modify this constructor. Mithra calls this internally.
// 		// You can call this constructor. You can also add new constructors.
// 	}
// 
//     // Added for ExercisesAdvancedFinder question 9
//     public void incrementAge()
//     {
//         this.setAge(this.getAge() + 1);
// 	}
// 
//     @Override
//     public String toString()
//     {
//         return "Person[name=" + this.getName()
//                 + "; country=" + this.getCountry()
//                 + "; age=" + this.getAge() + ']';
//     }
// }
// 
// Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
//         extends PersonListAbstract
// {
// 	public PersonList()
// 	{
// 		super();
// 	}
// 
// 	public PersonList(int initialSize)
// 	{
// 		super(initialSize);
// 	}
// 
// 	public PersonList(Collection c)
// 	{
// 		super(c);
// 	}
// 
// 	public PersonList(Operation operation)
// 	{
// 		super(operation);
// 	}
// }


import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.map.mutable.UnifiedMap;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
import org.eclipse.collections.impl.test.Verify;
import org.eclipse.collections.impl.tuple.Tuples;
import com.gs.fw.common.mithra.MithraObject;
import com.gs.fw.common.mithra.attribute.Attribute;
import com.gs.fw.common.mithra.finder.AbstractRelatedFinder;
import com.gs.fw.common.mithra.finder.RelatedFinder;
import kata.domain.AccountBalanceFinder;
import kata.domain.AllTypes;
import kata.domain.AllTypesFinder;
import kata.domain.Customer;
import kata.domain.CustomerAccount;
import kata.domain.CustomerAccountFinder;
import kata.domain.CustomerAccountList;
import kata.domain.CustomerFinder;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonList;
import org.junit.Assert;
import org.junit.Test;
// Stop counting when you reach stopAtPersonNamed (but include them in the count),
// and return the total.
// *Do not* fetch all rows, but *do* fetch them efficiently.

    public int countLettersOfNamesUpTo(final String stopAtPersonNamed)
    {
        Assert.fail("Implement this functionality to make the test pass");
        return 0;
    }

    @Test
    public void testQ8()
    {
        Assert.assertEquals(63, this.countLettersOfNamesUpTo("Clark Kent"));
        Assert.assertEquals(152, this.countLettersOfNamesUpTo("Donkey Kong"));
        Assert.assertEquals(174, this.countLettersOfNamesUpTo("Does Not Exist"));
    }

//-------------- Question 9 ------------------------------------------------------
// Add a method to PersonList to increment each Person's age by 1.

    public void incrementAges(PersonList people)
    {
        Assert.fail("Uncomment the following line, then go implement the method");
//        people.incrementAges();
    }

    @Test
    public void testQ9()
    {
// Path: main-kata/src/main/java/kata/domain/AllTypes.java
// public class AllTypes extends AllTypesAbstract
// {
//     public AllTypes()
//     {
//         super();
//         // You must not modify this constructor. Mithra calls this internally.
//         // You can call this constructor. You can also add new constructors.
//     }
// }
// 
// Path: main-kata/src/main/java/kata/domain/Customer.java
// public class Customer
//         extends CustomerAbstract
// {
// 	public Customer()
// 	{
// 		super();
// 		// You must not modify this constructor. Mithra calls this internally.
// 		// You can call this constructor. You can also add new constructors.
// 	}
// 
//     // Added as a convenience, particularly for ExercisesCrud questions 4, 7, & 8
// 	public Customer(final String name, final String country)
// 	{
// 		this();
// 		this.setName(name);
//         this.setCountry(country);
// 	}
// 
//     @Override
//     public String toString()
//     {
//         return "Customer[id=" + this.getCustomerId() + "; name=" + this.getName() + "; country=" + this.getCountry() + ']';
//     }
// }
// 
// Path: main-kata/src/main/java/kata/domain/CustomerAccount.java
// public class CustomerAccount
//         extends CustomerAccountAbstract
// {
// 	public CustomerAccount()
// 	{
// 		super();
// 		// You must not modify this constructor. Mithra calls this internally.
// 		// You can call this constructor. You can also add new constructors.
// 	}
// }
// 
// Path: main-kata/src/main/java/kata/domain/CustomerAccountList.java
// public class CustomerAccountList
//         extends CustomerAccountListAbstract
// {
// 	public CustomerAccountList()
// 	{
// 		super();
// 	}
// 
// 	public CustomerAccountList(int initialSize)
// 	{
// 		super(initialSize);
// 	}
// 
// 	public CustomerAccountList(Collection c)
// 	{
// 		super(c);
// 	}
// 
// 	public CustomerAccountList(Operation operation)
// 	{
// 		super(operation);
// 	}
// }
// 
// Path: main-kata/src/main/java/kata/domain/Person.java
// public class Person
//         extends PersonAbstract
// {
//     // Added for ExercisesAdvancedFinder question 9
//     public static final Procedure<Person> INCREMENT_AGE = new Procedure<Person>()
//     {
//         public void value(Person person)
//         {
//             person.incrementAge();
//         }
//     };
// 
// 	public Person()
// 	{
// 		super();
// 		// You must not modify this constructor. Mithra calls this internally.
// 		// You can call this constructor. You can also add new constructors.
// 	}
// 
//     // Added for ExercisesAdvancedFinder question 9
//     public void incrementAge()
//     {
//         this.setAge(this.getAge() + 1);
// 	}
// 
//     @Override
//     public String toString()
//     {
//         return "Person[name=" + this.getName()
//                 + "; country=" + this.getCountry()
//                 + "; age=" + this.getAge() + ']';
//     }
// }
// 
// Path: main-kata/src/main/java/kata/domain/PersonList.java
// public class PersonList
//         extends PersonListAbstract
// {
// 	public PersonList()
// 	{
// 		super();
// 	}
// 
// 	public PersonList(int initialSize)
// 	{
// 		super(initialSize);
// 	}
// 
// 	public PersonList(Collection c)
// 	{
// 		super(c);
// 	}
// 
// 	public PersonList(Operation operation)
// 	{
// 		super(operation);
// 	}
// }


// Path: main-kata/src/test/java/kata/test/ExercisesAdvancedFinder.java
import org.eclipse.collections.api.block.function.Function;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.map.MutableMap;
import org.eclipse.collections.api.set.MutableSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.api.tuple.Twin;
import org.eclipse.collections.impl.list.mutable.FastList;
import org.eclipse.collections.impl.map.mutable.UnifiedMap;
import org.eclipse.collections.impl.set.mutable.UnifiedSet;
import org.eclipse.collections.impl.test.Verify;
import org.eclipse.collections.impl.tuple.Tuples;
import com.gs.fw.common.mithra.MithraObject;
import com.gs.fw.common.mithra.attribute.Attribute;
import com.gs.fw.common.mithra.finder.AbstractRelatedFinder;
import com.gs.fw.common.mithra.finder.RelatedFinder;
import kata.domain.AccountBalanceFinder;
import kata.domain.AllTypes;
import kata.domain.AllTypesFinder;
import kata.domain.Customer;
import kata.domain.CustomerAccount;
import kata.domain.CustomerAccountFinder;
import kata.domain.CustomerAccountList;
import kata.domain.CustomerFinder;
import kata.domain.Person;
import kata.domain.PersonFinder;
import kata.domain.PersonList;
import org.junit.Assert;
import org.junit.Test;

// Stop counting when you reach stopAtPersonNamed (but include them in the count),
// and return the total.
// *Do not* fetch all rows, but *do* fetch them efficiently.

    public int countLettersOfNamesUpTo(final String stopAtPersonNamed)
    {
        Assert.fail("Implement this functionality to make the test pass");
        return 0;
    }

    @Test
    public void testQ8()
    {
        Assert.assertEquals(63, this.countLettersOfNamesUpTo("Clark Kent"));
        Assert.assertEquals(152, this.countLettersOfNamesUpTo("Donkey Kong"));
        Assert.assertEquals(174, this.countLettersOfNamesUpTo("Does Not Exist"));
    }

//-------------- Question 9 ------------------------------------------------------
// Add a method to PersonList to increment each Person's age by 1.

    public void incrementAges(PersonList people)
    {
        Assert.fail("Uncomment the following line, then go implement the method");
//        people.incrementAges();
    }

    @Test
    public void testQ9()
    {
        this.incrementAges(new PersonList(PersonFinder.all()));