// 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: mini-kata/src/main/java/kata/domain/PetList.java
// public class PetList extends PetListAbstract
// {
//     public PetList()
//     {
//         super();
//     }
// 
//     public PetList(int initialSize)
//     {
//         super(initialSize);
//     }
// 
//     public PetList(Collection c)
//     {
//         super(c);
//     }
// 
//     public PetList(Operation operation)
//     {
//         super(operation);
//     }
// 
//     /**
//      * For each element in the list, print out petName() + " plays".
//      */
//     public void play()
//     {
//         throw new UnsupportedOperationException("Implement this as a part of kata.testExercise4Test.makePetsPlay");
//     }
// }
// 
// Path: mini-kata/src/main/java/kata/domain/PetType.java
// public class PetType extends PetTypeAbstract
// {
//     public static final int CAT_ID = 1;
//     public static final int DOG_ID = 2;
//     public static final int SNAKE_ID = 3;
//     public static final int BIRD_ID = 4;
//     public static final int TURTLE_ID = 5;
//     public static final int HAMSTER_ID = 6;
// 
//     public PetType()
//     {
//         super();
//         // You must not modify this constructor. Mithra calls this internally.
//         // You can call this constructor. You can also add new constructors.
//     }
// }


import com.gs.fw.common.mithra.MithraManagerProvider;
import com.gs.fw.finder.Navigation;
import kata.domain.PersonList;
import kata.domain.PetFinder;
import kata.domain.PetList;
import kata.domain.PetType;
import org.eclipse.collections.impl.factory.Lists;
import org.eclipse.collections.impl.factory.Sets;
import org.eclipse.collections.impl.test.Verify;
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 Exercise2Test extends AbstractMithraTest
{
    /**
     * Find the list of {@code Pet}s. Order them first by {@code petAge} descending, and then by {@code petName} ascending.
     * Use appropriate method on {@link PetFinder} and {@link PetList}
     */
    @Test
    public void getAllPetsDescendingOrderedByAgeAndAscendingByName()
    {
        PetList pets = null;

        Verify.assertListsEqual(Lists.mutable.with("Speedy", "Spot", "Spike", "Dolly", "Tabby", "Tweety", "Fuzzy", "Wuzzy"),
                pets.asEcList().collect(TO_PET_NAME));
    }

    /**
     * Find all the {@code Person} objects which have at least 1 {@code Pet}.
     * Use Reladomo's relationship traversal between {@code Person} and {@code Pet}
     * Use appropriate method on {@link kata.domain.PersonFinder}
     */
    @Test
    public void getAllPeopleWithPets()
    {
// 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: mini-kata/src/main/java/kata/domain/PetList.java
// public class PetList extends PetListAbstract
// {
//     public PetList()
//     {
//         super();
//     }
// 
//     public PetList(int initialSize)
//     {
//         super(initialSize);
//     }
// 
//     public PetList(Collection c)
//     {
//         super(c);
//     }
// 
//     public PetList(Operation operation)
//     {
//         super(operation);
//     }
// 
//     /**
//      * For each element in the list, print out petName() + " plays".
//      */
//     public void play()
//     {
//         throw new UnsupportedOperationException("Implement this as a part of kata.testExercise4Test.makePetsPlay");
//     }
// }
// 
// Path: mini-kata/src/main/java/kata/domain/PetType.java
// public class PetType extends PetTypeAbstract
// {
//     public static final int CAT_ID = 1;
//     public static final int DOG_ID = 2;
//     public static final int SNAKE_ID = 3;
//     public static final int BIRD_ID = 4;
//     public static final int TURTLE_ID = 5;
//     public static final int HAMSTER_ID = 6;
// 
//     public PetType()
//     {
//         super();
//         // You must not modify this constructor. Mithra calls this internally.
//         // You can call this constructor. You can also add new constructors.
//     }
// }


// Path: mini-kata/src/test/java/kata/test/Exercise2Test.java
import com.gs.fw.common.mithra.MithraManagerProvider;
import com.gs.fw.finder.Navigation;
import kata.domain.PersonList;
import kata.domain.PetFinder;
import kata.domain.PetList;
import kata.domain.PetType;
import org.eclipse.collections.impl.factory.Lists;
import org.eclipse.collections.impl.factory.Sets;
import org.eclipse.collections.impl.test.Verify;
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 Exercise2Test extends AbstractMithraTest
{
    /**
     * Find the list of {@code Pet}s. Order them first by {@code petAge} descending, and then by {@code petName} ascending.
     * Use appropriate method on {@link PetFinder} and {@link PetList}
     */
    @Test
    public void getAllPetsDescendingOrderedByAgeAndAscendingByName()
    {
        PetList pets = null;

        Verify.assertListsEqual(Lists.mutable.with("Speedy", "Spot", "Spike", "Dolly", "Tabby", "Tweety", "Fuzzy", "Wuzzy"),
                pets.asEcList().collect(TO_PET_NAME));
    }

    /**
     * Find all the {@code Person} objects which have at least 1 {@code Pet}.
     * Use Reladomo's relationship traversal between {@code Person} and {@code Pet}
     * Use appropriate method on {@link kata.domain.PersonFinder}
     */
    @Test
    public void getAllPeopleWithPets()
    {
        PersonList petPeople = null;