// 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;
/*
 Copyright 2018 Goldman Sachs.
 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 kata.test;


public class ExercisesAdvancedFinder
        extends AbstractMithraTest
{
    @Override
    protected String[] getTestDataFilenames()
    {
        // Look into these files to see the test data being used
        return new String[]{"testdata/data_Person.txt", "testdata/data_CustomersAndAccounts.txt"};
    }

//-------------- Question 1 ------------------------------------------------------
// Given a Customer, find their list of accounts
// *without* using customer.getAccounts().

    public CustomerAccountList getAccountsByCustomer(Customer customer)
    {
        Assert.fail("Implement this functionality to make the test pass");
        return null;
    }

    @Test
    public void testQ1()
    {
        Customer suzukiSan = CustomerFinder.findOne(CustomerFinder.name().eq("Yuki Suzuki"));

// 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;

/*
 Copyright 2018 Goldman Sachs.
 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 kata.test;


public class ExercisesAdvancedFinder
        extends AbstractMithraTest
{
    @Override
    protected String[] getTestDataFilenames()
    {
        // Look into these files to see the test data being used
        return new String[]{"testdata/data_Person.txt", "testdata/data_CustomersAndAccounts.txt"};
    }

//-------------- Question 1 ------------------------------------------------------
// Given a Customer, find their list of accounts
// *without* using customer.getAccounts().

    public CustomerAccountList getAccountsByCustomer(Customer customer)
    {
        Assert.fail("Implement this functionality to make the test pass");
        return null;
    }

    @Test
    public void testQ1()
    {
        Customer suzukiSan = CustomerFinder.findOne(CustomerFinder.name().eq("Yuki Suzuki"));

        CustomerAccountList accounts = this.getAccountsByCustomer(suzukiSan);