// 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/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/CustomerList.java
// public class CustomerList
//         extends CustomerListAbstract
// {
// 	public CustomerList()
// 	{
// 		super();
// 	}
// 
// 	public CustomerList(int initialSize)
// 	{
// 		super(initialSize);
// 	}
// 
// 	public CustomerList(Collection c)
// 	{
// 		super(c);
// 	}
// 
// 	public CustomerList(Operation operation)
// 	{
// 		super(operation);
// 	}
// }


import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.factory.primitive.IntSets;
import org.eclipse.collections.impl.list.mutable.FastList;
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.MithraManagerProvider;
import kata.domain.Customer;
import kata.domain.CustomerAccountFinder;
import kata.domain.CustomerAccountList;
import kata.domain.CustomerFinder;
import kata.domain.CustomerList;
    {
        // Implement your solution here.

        // Notes:
        // 1) The test below will not compile until you add the new relationship.
        // 2) You need to enable the test below by uncommenting the commented line
        //    once you have created the new relationship.
        // 3) Don't forget to re-run your build to see the new relationship
        //    get generated.

        Customer john = CustomerFinder.findOne(CustomerFinder.customerId().eq(1));
        CustomerAccountList savingAccounts = null;
        Assert.fail("Uncomment the following line to enable this test");
//        savingAccounts = john.getAccountsOfType("Savings");
        Verify.assertSize(2, savingAccounts);
    }

//--------------------------- Question 4 -------------------------------------------------------
// Add new customer with a list of accounts given as parameter.
// You can assume that the customer does not exist.
// Remember you will need to get Mithra to generate the new accountIds for you.

    public void addCustomerAccounts(String name, String location, MutableList<Pair<String, String>> accountDescriptionAndTypePairs)
    {
        Assert.fail("Implement this functionality to make the test pass");
    }

    @Test
    public void testQ4()
    {
// 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/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/CustomerList.java
// public class CustomerList
//         extends CustomerListAbstract
// {
// 	public CustomerList()
// 	{
// 		super();
// 	}
// 
// 	public CustomerList(int initialSize)
// 	{
// 		super(initialSize);
// 	}
// 
// 	public CustomerList(Collection c)
// 	{
// 		super(c);
// 	}
// 
// 	public CustomerList(Operation operation)
// 	{
// 		super(operation);
// 	}
// }


// Path: main-kata/src/test/java/kata/test/ExercisesRelationships.java
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.eclipse.collections.api.list.MutableList;
import org.eclipse.collections.api.set.primitive.IntSet;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.factory.primitive.IntSets;
import org.eclipse.collections.impl.list.mutable.FastList;
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.MithraManagerProvider;
import kata.domain.Customer;
import kata.domain.CustomerAccountFinder;
import kata.domain.CustomerAccountList;
import kata.domain.CustomerFinder;
import kata.domain.CustomerList;

    {
        // Implement your solution here.

        // Notes:
        // 1) The test below will not compile until you add the new relationship.
        // 2) You need to enable the test below by uncommenting the commented line
        //    once you have created the new relationship.
        // 3) Don't forget to re-run your build to see the new relationship
        //    get generated.

        Customer john = CustomerFinder.findOne(CustomerFinder.customerId().eq(1));
        CustomerAccountList savingAccounts = null;
        Assert.fail("Uncomment the following line to enable this test");
//        savingAccounts = john.getAccountsOfType("Savings");
        Verify.assertSize(2, savingAccounts);
    }

//--------------------------- Question 4 -------------------------------------------------------
// Add new customer with a list of accounts given as parameter.
// You can assume that the customer does not exist.
// Remember you will need to get Mithra to generate the new accountIds for you.

    public void addCustomerAccounts(String name, String location, MutableList<Pair<String, String>> accountDescriptionAndTypePairs)
    {
        Assert.fail("Implement this functionality to make the test pass");
    }

    @Test
    public void testQ4()
    {
        CustomerAccountList accountsBefore = CustomerAccountFinder.findMany(CustomerAccountFinder.all());