<repo_name>AKSHARA-T-S-B/javaProject<file_sep>/CyclePriceCalculator/Model/Components/HandleBar/HandleBar.java
package Model.Components.HandleBar;

public class HandleBar {
	private PursuitBar[] pursuitBar;
	private DropBar[] dropBar;
	private RiserBar[] riserBar;

	public synchronized PursuitBar[] getPursuitBar() {
		return pursuitBar;
	}

	public synchronized void setPursuitBar(PursuitBar[] pursuitBar) {
		this.pursuitBar = pursuitBar;
	}

	public synchronized DropBar[] getDropBar() {
		return dropBar;
	}

	public synchronized void setDropBar(DropBar[] dropBar) {
		this.dropBar = dropBar;
	}

	public synchronized RiserBar[] getRiserBar() {
		return riserBar;
	}

	public synchronized void setRiserBar(RiserBar[] riserBar) {
		this.riserBar = riserBar;
	}
}
<file_sep>/Family Tree/FamilyTree.java
package family;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

/**
 * Family tree problem
 * @author Akshara
 */
class RelationHandler{

	/**
	 * Build default family tree
	 * @return head of the family 
	 */
	Person buildShanFamily(){
		Person root = new Person("Shan", Gender.MALE);
		root.addMarriage(new Person("Anga", Gender.FEMALE));
		root.addSon("Chit");
		root.addSon("Ish");
		root.addSon("Vich");
		root.addSon("Aras");
		root.addDaughter("Satya");
		Person chit = searchMember(root, "Chit");
		chit.addMarriage(new Person("Amba", Gender.FEMALE));
		chit.addDaughter("Dritha");
		chit.addDaughter("Tritha");
		chit.addSon("Vritha");
		Person dritha = searchMember(root, "Dritha");
		dritha.addMarriage(new Person("Jaya", Gender.MALE));
		dritha.addSon("Yodhan");
		Person vich = searchMember(root, "Vich");
		vich.addMarriage(new Person("Lika", Gender.FEMALE));
		vich.addDaughter("Vila");
		vich.addDaughter("Chika");
		Person aras = searchMember(root, "Aras");
		aras.addMarriage(new Person("Chitra", Gender.FEMALE));
		aras.addDaughter("Jnki");
		aras.addSon("Ahit");
		Person jnki = searchMember(root, "Jnki");
		jnki.addMarriage(new Person("Arit", Gender.MALE));
		jnki.addSon("Laki");
		jnki.addDaughter("Lavnya");
		Person satya = searchMember(root, "Satya");
		satya.addMarriage(new Person("Vyan", Gender.MALE));
		satya.addSon("Asva");
		satya.addSon("Vyas");
		satya.addDaughter("Atya");
		Person asva = searchMember(root, "Asva");
		asva.addMarriage(new Person("Satvy", Gender.FEMALE));
		asva.addSon("Vasa");
		Person vyas = searchMember(root, "Vyas");
		vyas.addMarriage(new Person("Krpi", Gender.FEMALE));
		vyas.addSon("Kriya");
		vyas.addDaughter("Krith");
		return root;
	}

	/**
	 * Search if the person is part of the family
	 * @param head
	 * @param name
	 * @return the searched person
	 */
	Person searchMember(Person head, String name) {
		if (head == null || head.getName().equalsIgnoreCase(name))
			return head;
		if(head.getSpouse() != null && head.getSpouse().getName().equalsIgnoreCase(name))
			return head.getSpouse();
		if (head.getChildren() != null) {
			Person temp = null;
			for (Person person : head.getChildren()) {
				temp = searchMember(person, name);
				if (temp != null)
					return temp;
			}
		}
		return null;
	}


	/**
	 * Add a child to a family
	 * @param motherName
	 * @param child
	 * @param gender
	 * @param root
	 */
	public void addMember(String motherName, String child, String gender, Person root) {
		Person person = searchMember(root, child);
		if(person == null) {
			Person mother = searchMember(root, motherName);
			if(mother == null) 
				System.out.println("PERSON_NOT_FOUND");
			else if(mother != null && mother.getGender().equals(Gender.FEMALE)) {
				Person spouse = mother.getSpouse();
				if(spouse == null)
					System.out.println("CHILD_ADDITION_FAILED");
				else {
					mother.addChild(child, gender.equals("Male") ? Gender.MALE : Gender.FEMALE);
					System.out.println("CHILD_ADDITION_SUCCEEDED");
				}
			}else
				System.out.println("CHILD_ADDITION_FAILED");
		}else
			System.out.println("Duplicate person found. CHILD_ADDITION_FAILED");
	}
	
	/**
	 * Print list of persons
	 * @param personList
	 */
	public void printList(List<Person> personList) {
		if(personList.isEmpty())
			System.out.println("NONE");
		else {
			personList.forEach(action -> {
				System.out.print(action.getName() + " ");
			});
			System.out.println();
		}
	}

	/**
	 * Print the kids of the mother
	 * @param person : mother's details
	 * @param gender : Gender of the kid
	 */
	public List<Person> getKids(Person person, Gender gender) {
		List<Person> kidsList = new ArrayList<>();
		List<Person> childrenList = person.getChildren();
		if(!childrenList.isEmpty()) 
			kidsList.addAll(childrenList.stream()
										.filter(action->action.getGender().equals(gender))
										.collect(Collectors.toList()));
		return kidsList;
	}


	/**
	 * Print the maternal or paternal aunts or uncles
	 * @param parent
	 * @param gender
	 */
	public List<Person> getAuntUncle(Person parent, Gender gender) {
		List<Person> auntUncleList = new ArrayList<>();
		List<Person> siblingsList = parent.getSiblings();
		if(!siblingsList.isEmpty()) 
			auntUncleList.addAll(siblingsList.stream()
											 .filter(action->action.getGender().equals(gender))
											 .collect(Collectors.toList()));
		return auntUncleList;
	}

	/**
	 * Print the sister-in-law or brother-in-law of the person 
	 * @param person
	 * @param gender
	 */
	public List<Person> getInLaws(Person person, Gender gender) {
		List<Person> inLawList = new ArrayList<>();
		Person spouse = person.getSpouse();
		if(spouse != null) {
			List<Person> siblingsList = spouse.getSiblings();
			if(!siblingsList.isEmpty()) 
				inLawList.addAll(siblingsList.stream()
											 .filter(action -> action.getGender().equals(gender))
											 .collect(Collectors.toList()));
		}
		List<Person> siblings = person.getSiblings();
		if(!siblings.isEmpty()) {
			List<Person> spouseList = new ArrayList<>();
			spouseList.addAll(siblings.stream()
									  .map(action -> action.getSpouse())
									  .filter(result -> result != null)
									  .collect(Collectors.toList()));
			inLawList.addAll(spouseList.stream()
									   .filter(action -> action.getGender().equals(gender))
									   .collect(Collectors.toList()));
		}
		return inLawList;
	}

	/**
	 * Decode the relationship and invoke the corresponding relation function call
	 * @param name
	 * @param relation
	 * @param root
	 */
	public void getRelation(String name, String relation, Person root) {
		Person person = searchMember(root, name);
		if(person == null)
			System.out.println("PERSON_NOT_FOUND");
		else { 
			if(relation.equalsIgnoreCase("son")) 
				printList(getKids(person, Gender.MALE));
			if(relation.equalsIgnoreCase("daughter")) 
				printList(getKids(person, Gender.FEMALE));
			if(relation.equalsIgnoreCase("siblings")) 
				printList(person.getSiblings());;
			if(relation.equalsIgnoreCase("paternal-uncle")) 
				printList(getAuntUncle(person.getFather(), Gender.MALE));
			if(relation.equalsIgnoreCase("paternal-aunt")) 
				printList(getAuntUncle(person.getFather(), Gender.FEMALE));
			if(relation.equalsIgnoreCase("maternal-uncle")) 
				printList(getAuntUncle(person.getMother(), Gender.MALE));
			if(relation.equalsIgnoreCase("maternal-aunt")) 
				printList(getAuntUncle(person.getMother(), Gender.FEMALE));
			if(relation.equalsIgnoreCase("sister-in-law")) 
				printList(getInLaws(person, Gender.FEMALE));
			if(relation.equalsIgnoreCase("brother-in-law")) 
				printList(getInLaws(person, Gender.MALE));
		}
	}
}
/**
 * @author Akshara
 * Main program to run the Family tree application
 */
public class FamilyTree {
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		boolean flag = false;
		RelationHandler relationHandler = new RelationHandler();
		Person root = relationHandler.buildShanFamily();
		System.out.println("Enter the location for the test file");
		Scanner scanner = new Scanner(System.in);
		String filePath = scanner.nextLine();
		try {
			FileInputStream fileReader = new FileInputStream(filePath);   
			scanner = new Scanner(fileReader);
			while(scanner.hasNextLine()) {
				String input = scanner.nextLine();
				String[] splitString = input.split("\\s+");
				if(splitString.length > 0 && splitString[0].contains("ADD_CHILD")) {
					flag = true;
					if(splitString.length != 4)
						System.out.println(input.trim() + " - Insufficient details provided to add a child");	
					else {
						relationHandler.addMember(splitString[1], splitString[2], splitString[3], root);
						
					}
				}
				if(splitString.length > 0 && splitString[0].contains("GET_RELATIONSHIP")) {
					flag = true;
					if(splitString.length != 3)
						System.out.println(input + " - Insufficient details provided to get a relationship");
					else {
						relationHandler.getRelation(splitString[1], splitString[2], root);
					}
				}
			}
			if(!flag) {
				System.out.println("Input file is empty!!!");
			}
		}catch(FileNotFoundException exception) {
			System.out.println("File not found. Incorrect file path specified !!! Try again with correct file path...");
		}
	}
}
<file_sep>/Car Parking/ParkingAllocation.java
import java.io.*;
import java.util.*;
import java.util.stream.Collectors;

/**
 * Car parking allocation problem
 * @author Akshara
 *
 */
class Car{
    String regNo;
    String colour;
    
    Car(){
        this.regNo = null;
        this.colour = null;
    }
    
    Car(String regNo, String colour){
        this.regNo = regNo;
        this.colour = colour;
    }
    
    String getRegNo(){
        return regNo;
    }
    
    String getColour(){
        return colour;
    }
    
    boolean isNull(){
        if(this.regNo == null && this.colour == null){
            return true;
        }
        return false;
    }
}

class ParkingSpace{
    
    //createParkingSlot is to create a parking slot based on user defined input
    int createParkingSlot() throws IOException{
        int parkingSlot = 0;
        System.out.println("Enter the number of slots to create a parking lot");
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            parkingSlot = Integer.parseInt(reader.readLine());    
        }catch(NumberFormatException exception){
            
        }
        return parkingSlot;       
    }
    
    //parkVehicles will allocate the available slots for the vehicles which needed to be parked
    Map<String, Object> parkVehicles(TreeMap<Integer, Car> parkingMap, Car car){
        Map<String, Object> resultMap = new HashMap<>();
        if(parkingMap.isEmpty()){
            parkingMap.put(1, car);
            resultMap.put("AllocatedSlot", 1);
        }else{
            List<Integer> availableSlotList = parkingMap.entrySet()
                                                        .stream()
                                                        .filter(record -> record.getValue().isNull())
                                                        .map(Map.Entry::getKey)
                                                        .collect(Collectors.toList());
            if(availableSlotList.isEmpty()){
                int lastFilledSlot = parkingMap.lastKey();
                parkingMap.put(++lastFilledSlot, car); 
                resultMap.put("AllocatedSlot", lastFilledSlot);
            }else{
                int slot = availableSlotList.get(0);
                parkingMap.put(slot, car); 
                resultMap.put("AllocatedSlot", slot);
            }
        }
        resultMap.put("ParkingMap", parkingMap);
        return resultMap;
    }
    
    //leave will depart the parked vehicles
    TreeMap<Integer, Car> leave(TreeMap<Integer, Car> parkingMap, int slot){
        if(parkingMap.containsKey(slot)){
            if(parkingMap.size() > 1){
                parkingMap.put(slot, new Car());    
            }else{
                parkingMap = new TreeMap<>();
            }
            System.out.println("Slot number " + slot + " is free"); 
        }else{
           System.out.println("Slot number " + slot + " is already free");  
        }
        return parkingMap;
    }
    
    //status is to show the available and filled slots in the parking
    void status(TreeMap<Integer, Car> parkingMap){
            System.out.print("\nSlot No.\tRegistration No.\tColour\n");
            parkingMap.entrySet()
                      .stream()
                      .forEach(record -> {
                                            if(!record.getValue().isNull()){
                                                System.out.print(record.getKey() + "\t\t"  
                                                                 + record.getValue().getRegNo() + "\t\t\t" 
                                                                 + record.getValue().getColour() + "\n");
                                            }}); 
    }
    
    //findRegistrationNumber will return the registration numbers of the cars based on the colour specified by the user
    void findRegistrationNumber(TreeMap<Integer, Car> parkingMap, String colour){
        List<String> regNoList = parkingMap.entrySet()
                                           .stream()
                                           .filter(record -> {
                                                    if(!record.getValue().isNull() && colour.equals(record.getValue().getColour())){
                                                        return true;
                                                    }
                                                return false;
                                            })
                                            .map(p -> p.getValue().getRegNo())
                                            .collect(Collectors.toList());
                                            
        if(regNoList.isEmpty()){
            System.out.println("Not found");    
        }else{
            System.out.println("Register numbers for the cars are :");
            regNoList.forEach(System.out::println);
        }
    }
    
    //findSlotNumber will return the slot numbers of the parked cars based on the colour specified by the user
    void findSlotNumber(TreeMap<Integer, Car> parkingMap, String colour){
        List<Integer> slotNoList = parkingMap.entrySet()
                                             .stream()
                                             .filter(record -> {
                                                    if(!record.getValue().isNull() && colour.equals(record.getValue().getColour())){
                                                        return true;
                                                    }
                                                return false;
                                                })
                                             .map(value -> value.getKey())
                                             .collect(Collectors.toList());
        if(slotNoList.isEmpty()){
            System.out.println("Not found");    
        }else{
            System.out.println("Slot numbers for the cars are :");
            slotNoList.forEach(System.out::println);
        }
    }
    
    //findByRegistrationNumber will return the slot number for the particular registration number of the car
    void findByRegistrationNumber(TreeMap<Integer, Car> parkingMap, String registrationNumber){
        int slot = 0;
        for (Map.Entry<Integer, Car> slotDetails : parkingMap.entrySet()) {
            if(!slotDetails.getValue().isNull()){
                if(registrationNumber.equals(slotDetails.getValue().getRegNo())){
                    slot = slotDetails.getKey();
                        break;
                }
            }
        }
        if(slot == 0){
            System.out.println("Not found");
        }else{
            System.out.println("Slot number : " + slot);
        }
    }
    
    //findRegNoDuplicate is to find whether the car with the registration number is already parked
    boolean findRegNoDuplicate(TreeMap<Integer, Car> parkingMap, String regNo){
        if(parkingMap.isEmpty()){
            return true;
        }
        List<Integer> slotList = parkingMap.entrySet().stream()
                            .filter(record -> {
                                                if(!record.getValue().isNull() && regNo.equals(record.getValue().getRegNo())){
                                                    return true;
                                                }
                                                return false;
                                            })
                            .map(value -> value.getKey())
                            .collect(Collectors.toList());
        if(slotList.isEmpty()){
            return true;
        }
        return false;
    }
}

public class ParkingAllocation{
    
    public static void main(String []args) throws IOException{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        Scanner scanner = new Scanner(System.in);
        int parkingSlot, slot, availableSlotFlag;
        String regNo, colour;
        Map<String, Object> resultMap = new HashMap<>();
        TreeMap<Integer, Car> parkingMap = new TreeMap<>();
        ParkingSpace parkingSpace = new ParkingSpace();
        parkingSlot = parkingSpace.createParkingSlot();
        while(parkingSlot <= 0){
            System.out.println("Enter the valid number for parking slots. Slots should be greater than 0");
            parkingSlot = parkingSpace.createParkingSlot();
        }
        System.out.println("Created a parking lot with " + parkingSlot + " slots");
        availableSlotFlag = parkingSlot;
        int operation = 0;
        while(true){
            System.out.println("\n1 Park vehicles \n2 Leave \n3 Status \n4 Find \n\nNumber entered greater than 4 will exit the program\nEnter the operation to be performed");
            try{
                operation = Integer.parseInt(reader.readLine());
            }catch(NumberFormatException exception){
                operation = 0;
            }
            switch(operation){
                case 0 :System.out.println("Enter valid operation");
                        break;
                case 1 ://PARK VEHICLES
                        if(availableSlotFlag > 0){
                            System.out.println("Enter the registration number for car");
                            regNo = scanner.next();
                            boolean duplicateRegNo = parkingSpace.findRegNoDuplicate(parkingMap, regNo);
                            if(duplicateRegNo){
                                System.out.println("Enter the colour of the car");
                                colour = scanner.next();
                                Car car = new Car(regNo, colour);
                                resultMap = parkingSpace.parkVehicles(parkingMap, car);
                                availableSlotFlag = --availableSlotFlag;
                                parkingMap = (TreeMap<Integer, Car>)resultMap.get("ParkingMap");
                                System.out.println("Allocated slot number : " + (int)resultMap.get("AllocatedSlot"));
                            }else{
                                System.out.println("There is a car parked already with this register number " + regNo);
                            }
                        }else{
                           System.out.println("Sorry, parking lot is full");
                        }
                        break;
                case 2 ://LEAVE
                        System.out.println("Enter the slot number of the vehicle to depart");
                        try{
                            slot = Integer.parseInt(reader.readLine());
                        }catch(NumberFormatException exception){
                            slot = 0;
                            System.out.println("Enter valid slot");
                        }
                        if(slot > parkingSlot | slot <= 0){
                            System.out.println("There are totally " + parkingSlot 
                                + " slot/slots avaiable and slot number starts from 1. So enter valid slot");
                        }else{
                            parkingMap = parkingSpace.leave(parkingMap, slot);
                            ++availableSlotFlag;
                        }
                        break;
                case 3 ://STATUS
                        System.out.println("There are " + parkingSlot + " parking slot/slots in total");
                        if(parkingMap.isEmpty()){
                            System.out.print("All slots are free.");
                        }else{
                            parkingSpace.status(parkingMap);    
                        }
                        break;
                case 4 ://FIND
                        System.out.println("\n1 Find the registration numbers for the cars based on colour \n"
                                            + "2 Find the slot numbers for the cars based on colour \n"
                                            + "3 Find slot number for the registration number \nEnter the operation to be performed");
                        int findOption = 0;
                        try{
                            findOption = Integer.parseInt(reader.readLine());
                        }catch(NumberFormatException exception){
                            
                        }
                        switch(findOption){
                            case 1 ://FIND ALL REG NOs BASED ON CAR COLOUR
                                    System.out.println("Enter the colour");
                                    colour = scanner.next();
                                     if(parkingMap.isEmpty()){
                                        System.out.println("Not Found");
                                    }else{
                                        parkingSpace.findRegistrationNumber(parkingMap, colour);
                                    }
                                    break;
                            case 2 ://FIND ALL SLOT NOs BASED ON CAR COLOUR 
                                    System.out.println("Enter the colour");
                                    colour = scanner.next();
                                     if(parkingMap.isEmpty()){
                                        System.out.println("Not Found");
                                    }else{
                                        parkingSpace.findSlotNumber(parkingMap, colour);
                                    }
                                    break;
                            case 3 ://FIND THE SLOT NO BASED ON CAR REG NO
                                    System.out.println("Enter the registration number");
                                    regNo = scanner.next();
                                    if(parkingMap.isEmpty()){
                                        System.out.println("Not Found");
                                    }else{
                                        parkingSpace.findByRegistrationNumber(parkingMap, regNo);
                                    }
                                    break;
                            default: System.out.println("Enter valid option");
                        }
                        break;
                default:System.exit(0);
            }
        }
    }
}<file_sep>/Family Tree/Family.java
package family;

import java.util.List;

/**
 * Model to store the family details of the person
 * @author Akshara
 */
public class Family {
	private Person husband;
	private Person wife;
	private List<Person> children;
	
	public Family(Person member1, Person member2) {
		super();
		this.husband = (member1.getGender().equals(Gender.MALE))?member1:member2;
		this.wife = (member1.getGender().equals(Gender.FEMALE))?member1:member2;;
	}
	
	public synchronized Person getHusband() {
		return husband;
	}
	public synchronized void setHusband(Person husband) {
		this.husband = husband;
	}
	public synchronized Person getWife() {
		return wife;
	}
	public synchronized void setWife(Person wife) {
		this.wife = wife;
	}
	public synchronized List<Person> getChildren() {
		return children;
	}
	public synchronized void setChildren(List<Person> children) {
		this.children = children;
	}
}
<file_sep>/CyclePriceCalculator/Model/Components/ChainAssembly/ChainAssembly.java
package Model.Components.ChainAssembly;

public class ChainAssembly {
	private FixedGear[] fixedGear;
	private Gear3[] gear3;
	private Gear4[] gear4;
	private Gear5[] gear5;
	private Gear6[] gear6;
	private Gear7[] gear7;
	private Gear8[] gear8;

	public synchronized FixedGear[] getFixedGear() {
		return fixedGear;
	}

	public synchronized void setFixedGear(FixedGear[] fixedGear) {
		this.fixedGear = fixedGear;
	}

	public synchronized Gear3[] getGear3() {
		return gear3;
	}

	public synchronized void setGear3(Gear3[] gear3) {
		this.gear3 = gear3;
	}

	public synchronized Gear4[] getGear4() {
		return gear4;
	}

	public synchronized void setGear4(Gear4[] gear4) {
		this.gear4 = gear4;
	}

	public synchronized Gear5[] getGear5() {
		return gear5;
	}

	public synchronized void setGear5(Gear5[] gear5) {
		this.gear5 = gear5;
	}

	public synchronized Gear6[] getGear6() {
		return gear6;
	}

	public synchronized void setGear6(Gear6[] gear6) {
		this.gear6 = gear6;
	}

	public synchronized Gear7[] getGear7() {
		return gear7;
	}

	public synchronized void setGear7(Gear7[] gear7) {
		this.gear7 = gear7;
	}

	public synchronized Gear8[] getGear8() {
		return gear8;
	}

	public synchronized void setGear8(Gear8[] gear8) {
		this.gear8 = gear8;
	}
}
<file_sep>/Family Tree/Person.java
package family;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Model to store the details of a person and his/her family
 * @author Akshara
 *
 */
public class Person {
	private String name;
	private Gender Gender;
	private Family family;
	private Family parentFamily;
	
	public synchronized Family getFamily() {
		return family;
	}

	public synchronized Family getParentFamily() {
		return parentFamily;
	}

	public Person(String name, Gender Gender){
		this.name = name;
		this.Gender = Gender;
	}
	
	public Person(String name, Gender Gender, Family parentFamily) {
		this.name = name;
		this.Gender = Gender;
		this.parentFamily = parentFamily;
	}

	public synchronized String getName() {
		return name;
	}
	public synchronized void setName(String name) {
		this.name = name;
	}
	public synchronized Gender getGender() {
		return Gender;
	}
	public synchronized void setGender(Gender Gender) {
		this.Gender = Gender;
	}
	
	/**
	 * To get the person's father
	 * @return the reference of the father
	 */
	public Person getFather()
	{
		return  (this.parentFamily != null)?this.parentFamily.getHusband():null;
	}
	
	/**
	 * To get the person's mother
	 * @return the reference of the mother
	 */
	public Person getMother()
	{
		return  (this.parentFamily != null)?this.parentFamily.getWife():null;
	}
	
	/**
	 * To get the eprson's spouse
	 * @return the refrence of the spouse
	 */
	public Person getSpouse()
	{
		if(this.family != null)
		{
			return (this.Gender.equals(Gender.MALE))?this.family.getWife():this.family.getHusband();
		}
		return null;
	}
	
	/**
	 * To get the siblings 
	 * @return the list of siblings
	 */
	public List<Person> getSiblings()
	{
		List<Person> result = new ArrayList<>();
		if (this.parentFamily != null && this.parentFamily.getChildren() != null) {
			result.addAll(this.parentFamily.getChildren().stream().filter(child -> (!child.getName().equalsIgnoreCase(this.getName())))
					.collect(Collectors.toList()));
		}
		return result;
	}
	
	public Person addSon(String name)
	{
		addChild(name, Gender.MALE);
		return this;
	}
	
	public Person addDaughter(String name)
	{
		addChild(name, Gender.FEMALE);
		return this;
	}	
	
	/**
	 * To add a child to a family
	 * @param childName
	 * @param Gender
	 * @return the refernce of a child
	 */
	public Person addChild(String childName, Gender Gender)
	{
		if(this.family == null)
			System.out.println("There is no such family!!!");
		Person child = null;;
		if(childName != null && !childName.trim().isEmpty() && this.family != null)
		{
				child = new Person(childName, Gender, this.family);
				if(this.family.getChildren() == null)
					this.family.setChildren(new ArrayList<>());
				this.family.getChildren().add(child);
		}
		return child;
	}
	
	public List<Person> getChildren()
	{
		List<Person> result = new ArrayList<>();
		if(this.family != null && this.family.getChildren() != null)
			result.addAll(this.family.getChildren());
		return result;
	}
	
	/**
	 * To add husband or wife to the member of family
	 * @param spouse : Bride/Groom
	 * @return : reference Groom/Bride
	 */
	public Person addMarriage(Person spouse)
	{
		if(spouse != null)
		{
				this.family = new Family(this, spouse);
				spouse.family = this.family;
				return spouse;
		}
		return null;
	}
	
	/**
	 * print members of the family
	 * @param root
	 * @param level
	 */
	public void printMembers(Person root,int level)
	{
		if (root == null)
			return;
		String indent="";
		for(int i=level; i > 0; i--)
			indent +="\t";
		if(root.getSpouse() != null)
			System.out.println(indent+"->| "+root.getName()+"/"+root.getSpouse().getName());
		else
			System.out.println(indent+"->| "+root.getName());

		if (root.getChildren() != null) {
			level++;
			for (Person person : root.getChildren()) {
				printMembers(person,level);
			}
		}
	}

}
<file_sep>/CyclePriceCalculator/CyclePricing/TestCycleEstimator.java
package CyclePricing;

import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyMap;
import static org.mockito.Matchers.anyString;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

import org.junit.Test;
import org.mockito.Mockito;

import Model.Cycle;
import Model.Components.ChainAssembly.ChainAssembly;
import Model.Components.ChainAssembly.FixedGear;
import Model.Components.ChainAssembly.Gear3;
import Model.Components.ChainAssembly.Gear4;
import Model.Components.ChainAssembly.Gear5;
import Model.Components.ChainAssembly.Gear6;
import Model.Components.ChainAssembly.Gear7;
import Model.Components.ChainAssembly.Gear8;
import Model.Components.Frame.Aluminium;
import Model.Components.Frame.Contilever;
import Model.Components.Frame.Diamond;
import Model.Components.Frame.Frame;
import Model.Components.Frame.Recumbent;
import Model.Components.Frame.Steel;
import Model.Components.Frame.StepThrough;
import Model.Components.Frame.Titanium;
import Model.Components.HandleBar.DropBar;
import Model.Components.HandleBar.HandleBar;
import Model.Components.HandleBar.PursuitBar;
import Model.Components.HandleBar.RiserBar;
import Model.Components.Seating.ComfortSaddle;
import Model.Components.Seating.CruiserSaddle;
import Model.Components.Seating.RacingSaddle;
import Model.Components.Seating.Seating;
import Model.Components.Wheels.Rim;
import Model.Components.Wheels.Spokes;
import Model.Components.Wheels.Tube;
import Model.Components.Wheels.Tyre;
import Model.Components.Wheels.Wheels;

/**
 * 
 * @author AKSHARA
 *
 */
public class TestCycleEstimator {
	CycleEstimator cycleEstimator = new CycleEstimator();
	Cycle cycle = new Cycle();
	BlockingQueue<Map<String, Object>> blockingQueue = new ArrayBlockingQueue<>(10);
	CyclePriceCalculator cyclePriceCalculator = new CyclePriceCalculator(cycle, blockingQueue);
	CyclePriceCalculator cyclePriceCalculatorSpy;

	Map<String, Integer> setCostMap() {
		Map<String, Integer> costMap = new HashMap<>();
		costMap.put("year", 2020);
		costMap.put("jan", 250);
		costMap.put("feb", 250);
		costMap.put("mar", 250);
		costMap.put("apr", 260);
		costMap.put("may", 260);
		costMap.put("jun", 260);
		costMap.put("jul", 260);
		costMap.put("aug", 270);
		costMap.put("sep", 270);
		costMap.put("oct", 280);
		costMap.put("nov", 280);
		costMap.put("dec", 280);
		return costMap;
	}

	/**
	 * testcyclePriceCalculator is to test cyclePriceCalculator
	 */
	@Test
	public void testcyclePriceCalculator() {
		Map<String, String> cyclePriceMap = new HashMap<>();
		cyclePriceMap.put("frame", "1200");
		cyclePriceMap.put("seating", "580");
		cyclePriceMap.put("wheels", "895");
		cyclePriceMap.put("chainAssembly", "800");
		cyclePriceMap.put("handleBar", "620");
		String expected = "4095";
		String actual = cyclePriceCalculator.cyclePriceCalculator(cyclePriceMap);
		assertEquals(expected, actual);
	}

	/**
	 * testGetCurrentYear is to test getCurrentYear()
	 */
	@Test
	public void testGetCurrentYear() {
		String expected = "2020";
		String actual = cyclePriceCalculator.getCurrentYear();
		assertEquals(expected, actual);
	}

	/**
	 * testGetCurrentMonth is to test getCurrentMonth
	 */
	@Test
	public void testGetCurrentMonth() {
		String expected = "jul";
		String actual = cyclePriceCalculator.getCurrentMonth();
		assertEquals(expected, actual);
	}

	/**
	 * testCycleBuilder is to test cycleBuilder
	 */
	@Test
	public void testCycleBuilder() {
		Map<String, Object> cycleMap = new HashMap<>();
		cycleMap.put("name", "cycle");
		Map<String, String> dateMap = new HashMap<>();
		dateMap.put("year", "2020");
		dateMap.put("month", "jul");
		cycleMap.put("date_of_pricing", dateMap);
		cycleMap.put("frame", "diamond, steel");
		cycleMap.put("wheels", "");
		cycleMap.put("chainAssembly", "fixedGear");
		cycleMap.put("seating", "comfort");
		cycleMap.put("handleBar", "pursuit");
		Map<String, Object> cycleMap1 = new HashMap<>();
		cycleMap1.put("name", "cycle");
		cycleMap.put("wheels", "");
		assertEquals(cycleMap.toString(), cyclePriceCalculator.cycleBuilder(cycleMap1).toString());
	}

	/**
	 * testInitialiseSubComponentMap is to test initialiseSubComponentMap
	 */
	@Test
	public void testInitialiseSubComponentMap() {
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("rate", 0);
		subComponentMap.put("yearFlag", 0);
		subComponentMap.put("currentIndex", 0);
		assertEquals(subComponentMap, cyclePriceCalculator.initialiseSubComponentMap(new HashMap<String, Integer>()));
	}

	/**
	 * testFindRate is to test findRate
	 */
	@Test
	public void testFindRate() {
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("rate", 250);
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		Map<String, Integer> subComponentMap1 = new HashMap<>();
		subComponentMap1.put("year", 2020);
		Map<String, Integer> costMap = new HashMap<>();
		costMap.put("jul", 250);
		Map<String, Integer> subComponentMap2 = cyclePriceCalculator.findRate(subComponentMap1, "2020", "jul", costMap,
				0);
		assertEquals(subComponentMap, subComponentMap2);
	}

	/**
	 * testFrameRateCalculator1 is to test frame type diamond in frameRateCalculator
	 */
	@SuppressWarnings("unchecked")
	@Test
	public void testFrameRateCalculator1() {
		String expected = "520";
		Frame frame = new Frame();
		Diamond[] diamond = new Diamond[1];
		diamond[0] = new Diamond();
		diamond[0].setYear(2020);
		diamond[0].setCostMap(setCostMap());
		frame.setDiamond(diamond);
		Steel[] steel = new Steel[1];
		steel[0] = new Steel();
		steel[0].setYear(2020);
		steel[0].setCostMap(setCostMap());
		frame.setSteel(steel);
		cycle.setFrame(frame);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 520);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.frameRateCalculator("diamond, steel", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testFrameRateCalculator2 is to test frame type stepthrough in frameRateCalculator 
	 */
	@SuppressWarnings("unchecked")
	@Test
	public void testFrameRateCalculator2() {
		String expected = "500";
		Frame frame = new Frame();
		StepThrough[] stepThrough = new StepThrough[1];
		stepThrough[0] = new StepThrough();
		stepThrough[0].setYear(2020);
		stepThrough[0].setCostMap(setCostMap());
		frame.setStepThrough(stepThrough);
		Steel[] steel = new Steel[1];
		steel[0] = new Steel();
		steel[0].setYear(2020);
		steel[0].setCostMap(setCostMap());
		frame.setSteel(steel);
		cycle.setFrame(frame);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 500);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.frameRateCalculator("stepthrough, steel", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testFrameRateCalculator3 is to test frame type contilever in frameRateCalculator
	 */
	@SuppressWarnings("unchecked")
	@Test
	public void testFrameRateCalculator3() {
		String expected = "330";
		Frame frame = new Frame();
		Contilever[] contilever = new Contilever[1];
		contilever[0] = new Contilever();
		contilever[0].setYear(2020);
		contilever[0].setCostMap(setCostMap());
		frame.setContilever(contilever);
		Steel[] steel = new Steel[1];
		steel[0] = new Steel();
		steel[0].setYear(2020);
		steel[0].setCostMap(setCostMap());
		frame.setSteel(steel);
		cycle.setFrame(frame);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 330);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.frameRateCalculator("contilever, steel", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testFrameRateCalculator4 is to test frame type recumbent in frameRateCalculator
	 */
	@SuppressWarnings("unchecked")
	@Test
	public void testFrameRateCalculator4() {
		String expected = "300";
		Frame frame = new Frame();
		Recumbent[] recumbent = new Recumbent[1];
		recumbent[0] = new Recumbent();
		recumbent[0].setYear(2020);
		recumbent[0].setCostMap(setCostMap());
		frame.setRecumbent(recumbent);
		Steel[] steel = new Steel[1];
		steel[0] = new Steel();
		steel[0].setYear(2020);
		steel[0].setCostMap(setCostMap());
		frame.setSteel(steel);
		cycle.setFrame(frame);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 300);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.frameRateCalculator("recumbent, steel", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testFrameRateCalculator5 is to test frame type titanium in frameRateCalculator
	 */
	@SuppressWarnings("unchecked")
	@Test
	public void testFrameRateCalculator5() {
		String expected = "900";
		Frame frame = new Frame();
		Contilever[] contilever = new Contilever[1];
		contilever[0] = new Contilever();
		contilever[0].setYear(2020);
		contilever[0].setCostMap(setCostMap());
		frame.setContilever(contilever);
		Titanium[] titanium = new Titanium[1];
		titanium[0] = new Titanium();
		titanium[0].setYear(2020);
		titanium[0].setCostMap(setCostMap());
		frame.setTitanium(titanium);
		cycle.setFrame(frame);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 900);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.frameRateCalculator("titanium, contilever", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testFrameRateCalculator6 is to test frame type aluminum in frameRateCalculator
	 */
	@SuppressWarnings("unchecked")
	@Test
	public void testFrameRateCalculator6() {
		String expected = "900";
		Frame frame = new Frame();
		Aluminium[] aluminium = new Aluminium[1];
		aluminium[0] = new Aluminium();
		aluminium[0].setYear(2020);
		aluminium[0].setCostMap(setCostMap());
		frame.setAluminium(aluminium);
		Diamond[] diamond = new Diamond[1];
		diamond[0] = new Diamond();
		diamond[0].setYear(2020);
		diamond[0].setCostMap(setCostMap());
		frame.setDiamond(diamond);
		cycle.setFrame(frame);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 900);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.frameRateCalculator("aluminium, diamond", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testFrameRateCalculator7 is test frame type steel in frameRateCalculator
	 */
	@SuppressWarnings("unchecked")
	@Test
	public void testFrameRateCalculator7() {
		String expected = "550";
		Frame frame = new Frame();
		Recumbent[] recumbent = new Recumbent[1];
		recumbent[0] = new Recumbent();
		recumbent[0].setYear(2020);
		recumbent[0].setCostMap(setCostMap());
		frame.setRecumbent(recumbent);
		Steel[] steel = new Steel[1];
		steel[0] = new Steel();
		steel[0].setYear(2020);
		steel[0].setCostMap(setCostMap());
		frame.setSteel(steel);
		cycle.setFrame(frame);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 550);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.frameRateCalculator("steel, recumbent", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testWheelsRateCalculator1 is test tubesless type of wheels in wheelsRateCalculator 
	 */
	@Test
	public void testWheelsRateCalculator1() {
		String expected = "1650";
		Wheels wheels = new Wheels();
		Rim[] rim = new Rim[1];
		rim[0] = new Rim();
		rim[0].setYear(2020);
		rim[0].setCostMap(setCostMap());
		wheels.setRim(rim);
		Spokes[] spokes = new Spokes[1];
		spokes[0] = new Spokes();
		spokes[0].setYear(2020);
		spokes[0].setCostMap(setCostMap());
		wheels.setSpokes(spokes);
		Tube[] tube = new Tube[1];
		tube[0] = new Tube();
		tube[0].setYear(2020);
		tube[0].setCostMap(setCostMap());
		wheels.setTube(tube);
		Tyre[] tyre = new Tyre[1];
		tyre[0] = new Tyre();
		tyre[0].setYear(2020);
		tyre[0].setCostMap(setCostMap());
		wheels.setTyre(tyre);
		cycle.setWheels(wheels);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 550);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.wheelsRateCalculator("tubeless", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testWheelsRateCalculator2 is test rimless type of wheels in wheelsRateCalculator 
	 */
	@Test
	public void testWheelsRateCalculator2() {
		String expected = "1500";
		Wheels wheels = new Wheels();
		Rim[] rim = new Rim[1];
		rim[0] = new Rim();
		rim[0].setYear(2020);
		rim[0].setCostMap(setCostMap());
		wheels.setRim(rim);
		Spokes[] spokes = new Spokes[1];
		spokes[0] = new Spokes();
		spokes[0].setYear(2020);
		spokes[0].setCostMap(setCostMap());
		wheels.setSpokes(spokes);
		Tube[] tube = new Tube[1];
		tube[0] = new Tube();
		tube[0].setYear(2020);
		tube[0].setCostMap(setCostMap());
		wheels.setTube(tube);
		Tyre[] tyre = new Tyre[1];
		tyre[0] = new Tyre();
		tyre[0].setYear(2020);
		tyre[0].setCostMap(setCostMap());
		wheels.setTyre(tyre);
		cycle.setWheels(wheels);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 500);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.wheelsRateCalculator("rimless", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testWheelsRateCalculator3 is test spokeless type of wheels in wheelsRateCalculator 
	 */
	@Test
	public void testWheelsRateCalculator3() {
		String expected = "1200";
		Wheels wheels = new Wheels();
		Rim[] rim = new Rim[1];
		rim[0] = new Rim();
		rim[0].setYear(2020);
		rim[0].setCostMap(setCostMap());
		wheels.setRim(rim);
		Spokes[] spokes = new Spokes[1];
		spokes[0] = new Spokes();
		spokes[0].setYear(2020);
		spokes[0].setCostMap(setCostMap());
		wheels.setSpokes(spokes);
		Tube[] tube = new Tube[1];
		tube[0] = new Tube();
		tube[0].setYear(2020);
		tube[0].setCostMap(setCostMap());
		wheels.setTube(tube);
		Tyre[] tyre = new Tyre[1];
		tyre[0] = new Tyre();
		tyre[0].setYear(2020);
		tyre[0].setCostMap(setCostMap());
		wheels.setTyre(tyre);
		cycle.setWheels(wheels);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 400);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.wheelsRateCalculator("spokeless", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testChainAssemblyRateCalculator1 is to test fixed gear in chainAssemblyRateCalculator
	 */
	@Test
	public void testChainAssemblyRateCalculator1() {
		String expected = "520";
		ChainAssembly chainAssembly = new ChainAssembly();
		FixedGear[] fixed = new FixedGear[1];
		fixed[0] = new FixedGear();
		fixed[0].setYear(2020);
		fixed[0].setCostMap(setCostMap());
		chainAssembly.setFixedGear(fixed);
		cycle.setChainAssembly(chainAssembly);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 520);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.chainAssemblyRateCalculator("fixed", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testChainAssemblyRateCalculator2 is to test gear3 in chainAssemblyRateCalculator
	 */
	@Test
	public void testChainAssemblyRateCalculator2() {
		String expected = "600";
		ChainAssembly chainAssembly = new ChainAssembly();
		Gear3[] gear3 = new Gear3[1];
		gear3[0] = new Gear3();
		gear3[0].setYear(2020);
		gear3[0].setCostMap(setCostMap());
		chainAssembly.setGear3(gear3);
		cycle.setChainAssembly(chainAssembly);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 600);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.chainAssemblyRateCalculator("gear3", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testChainAssemblyRateCalculator3 is to test gear4 in chainAssemblyRateCalculator
	 */
	@Test
	public void testChainAssemblyRateCalculator3() {
		String expected = "650";
		ChainAssembly chainAssembly = new ChainAssembly();
		Gear4[] gear4 = new Gear4[1];
		gear4[0] = new Gear4();
		gear4[0].setYear(2020);
		gear4[0].setCostMap(setCostMap());
		chainAssembly.setGear4(gear4);
		cycle.setChainAssembly(chainAssembly);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 650);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.chainAssemblyRateCalculator("gear4", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testChainAssemblyRateCalculator4 is to test gear5 in chainAssemblyRateCalculator
	 */
	@Test
	public void testChainAssemblyRateCalculator4() {
		String expected = "670";
		ChainAssembly chainAssembly = new ChainAssembly();
		Gear5[] gear5 = new Gear5[1];
		gear5[0] = new Gear5();
		gear5[0].setYear(2020);
		gear5[0].setCostMap(setCostMap());
		chainAssembly.setGear5(gear5);
		cycle.setChainAssembly(chainAssembly);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 670);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.chainAssemblyRateCalculator("gear5", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testChainAssemblyRateCalculator5 is to test gear6 in chainAssemblyRateCalculator
	 */
	@Test
	public void testChainAssemblyRateCalculator5() {
		String expected = "680";
		ChainAssembly chainAssembly = new ChainAssembly();
		Gear6[] gear6 = new Gear6[1];
		gear6[0] = new Gear6();
		gear6[0].setYear(2020);
		gear6[0].setCostMap(setCostMap());
		chainAssembly.setGear6(gear6);
		cycle.setChainAssembly(chainAssembly);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 680);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.chainAssemblyRateCalculator("gear6", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testChainAssemblyRateCalculator6 is to test gear7 in chainAssemblyRateCalculator
	 */
	@Test
	public void testChainAssemblyRateCalculator6() {
		String expected = "680";
		ChainAssembly chainAssembly = new ChainAssembly();
		Gear7[] gear7 = new Gear7[1];
		gear7[0] = new Gear7();
		gear7[0].setYear(2020);
		gear7[0].setCostMap(setCostMap());
		chainAssembly.setGear7(gear7);
		cycle.setChainAssembly(chainAssembly);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 680);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.chainAssemblyRateCalculator("gear7", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testChainAssemblyRateCalculator7 is to test gear8 in chainAssemblyRateCalculator
	 */
	@Test
	public void testChainAssemblyRateCalculator7() {
		String expected = "680";
		ChainAssembly chainAssembly = new ChainAssembly();
		Gear8[] gear8 = new Gear8[1];
		gear8[0] = new Gear8();
		gear8[0].setYear(2020);
		gear8[0].setCostMap(setCostMap());
		chainAssembly.setGear8(gear8);
		cycle.setChainAssembly(chainAssembly);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 680);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.chainAssemblyRateCalculator("gear8", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testSeatingRateCalculator1 is to test cruiser saddle in seatingRateCalculator
	 */
	@Test
	public void testSeatingRateCalculator1() {
		String expected = "560";
		Seating seating = new Seating();
		CruiserSaddle[] cruiser = new CruiserSaddle[1];
		cruiser[0] = new CruiserSaddle();
		cruiser[0].setYear(2020);
		cruiser[0].setCostMap(setCostMap());
		seating.setCruiserSaddle(cruiser);
		cycle.setSeating(seating);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 560);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.seatingRateCalculator("cruiser", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testSeatingRateCalculator2 is to test racing saddle in seatingRateCalculator
	 */
	@Test
	public void testSeatingRateCalculator2() {
		String expected = "590";
		Seating seating = new Seating();
		RacingSaddle[] racing = new RacingSaddle[1];
		racing[0] = new RacingSaddle();
		racing[0].setYear(2020);
		racing[0].setCostMap(setCostMap());
		seating.setRacingSaddle(racing);
		cycle.setSeating(seating);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 590);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.seatingRateCalculator("racing", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testSeatingRateCalculator3 is to test comfort saddle in seatingRateCalculator
	 */
	@Test
	public void testSeatingRateCalculator3() {
		String expected = "650";
		Seating seating = new Seating();
		ComfortSaddle[] comfort = new ComfortSaddle[1];
		comfort[0] = new ComfortSaddle();
		comfort[0].setYear(2020);
		comfort[0].setCostMap(setCostMap());
		seating.setComfortSaddle(comfort);
		cycle.setSeating(seating);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 650);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.seatingRateCalculator("comfort", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testHandlBarRateCalculator1 is to test drop handle bar in handlBarRateCalculator
	 */
	@Test
	public void testHandlBarRateCalculator1() {
		String expected = "700";
		HandleBar handleBar = new HandleBar();
		DropBar[] dropBar = new DropBar[1];
		dropBar[0] = new DropBar();
		dropBar[0].setYear(2020);
		dropBar[0].setCostMap(setCostMap());
		handleBar.setDropBar(dropBar);
		cycle.setHandleBar(handleBar);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 700);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.handleBarRateCalculator("drop", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testHandlBarRateCalculator2 is to test pursuit handle bar in handlBarRateCalculator
	 */
	@Test
	public void testHandlBarRateCalculator2() {
		String expected = "700";
		HandleBar handleBar = new HandleBar();
		PursuitBar[] pursuitBar = new PursuitBar[1];
		pursuitBar[0] = new PursuitBar();
		pursuitBar[0].setYear(2020);
		pursuitBar[0].setCostMap(setCostMap());
		handleBar.setPursuitBar(pursuitBar);
		cycle.setHandleBar(handleBar);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 700);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.handleBarRateCalculator("pursuit", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

	/**
	 * testHandlBarRateCalculator3 is to test riser handle bar in handlBarRateCalculator
	 */
	@Test
	public void testHandlBarRateCalculator3() {
		String expected = "700";
		HandleBar handleBar = new HandleBar();
		RiserBar[] riserBar = new RiserBar[1];
		riserBar[0] = new RiserBar();
		riserBar[0].setYear(2020);
		riserBar[0].setCostMap(setCostMap());
		handleBar.setRiserBar(riserBar);
		cycle.setHandleBar(handleBar);
		Map<String, Integer> subComponentMap = new HashMap<>();
		subComponentMap.put("yearFlag", 1);
		subComponentMap.put("rate", 700);
		subComponentMap.put("currentIndex", 0);
		subComponentMap.put("year", 2020);
		CyclePriceCalculator cyclePriceCalculator1 = new CyclePriceCalculator(cycle, blockingQueue);
		CyclePriceCalculator cyclePriceCalculatorSpy = Mockito.spy(cyclePriceCalculator1);
		Mockito.when(cyclePriceCalculatorSpy.findRate(anyMap(), anyString(), anyString(), anyMap(), anyInt()))
				.thenReturn(subComponentMap);
		String actual = cyclePriceCalculatorSpy.handleBarRateCalculator("riser", "2020", "jul", cycle);
		assertEquals(expected, actual);
	}

}<file_sep>/Family Tree/README.txt
Family tree program is to model out the King Shan family so that :
	- Given a 'name' and a 'relationship', the people corresponding to that relationship in the order in which they were added to the family will be displayed asssuming the names of the family members are unique.
	- Program will enable us to add a child to any family in the tree through the mother.

System Requirements:
---------------------
	- System must have java-8 or higher version.
	- System must comply minimum requirements specified for jvm.

Libraries added in the application
-----------------------------------
	- junit-4.13.jar
		- Used for unit testing of the code. All Unit tests are written in TestGeekTrust.java, which can be run using TestRunner.java.
	- hamcrest-core-1.3.jar
		- Compile time dependency of Junit.
	- mockito-all-1.9.5.jar
		- Used to create and configure mock objects which simplifies the development of tests for classes with external dependencies.

Running in an IDE
---------------------
If you want to run the application in an IDE, such as Eclipse, copy the code and add the corresponding dependencies into classpath and then run FamilyTree.java to run application or TestFamilyTree.java to run the tests.

Execution instructions:
--------------------------
	- Program will take the location to the test file as the input paramter. 
	- Input will be read from a text file.
	- Corresponding output to the test file will be displayed in the console.
 
Relationships handled:
-----------------------
	Paternal-Uncle
	Maternal-Uncle
	Paternal-Aunt
	Maternal-Aunt
	Sister-In-Law
	Brother-In-Law
	Son
	Daughter
	Siblings 

Inputs to the application:
-------------------------
	- To add child
		ADD_CHILD Tritha Aarohi Female
		
	- To search a relation
		GET_RELATIONSHIP Vasa Siblings


Assumptions:
-------------
	- Existing family tree in the problem statement will be initialised during the start of the program.
	- Each person who is added in family tree must have parent associated with it except head of the family. 
	- All Persons should have a unique name in the tree.
	- A member can only be added with an existing member only.

<file_sep>/Family Tree/TestFamilyTree.java
package family;

import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.times;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;
import org.mockito.Mockito;

/**
 * Testcases to test Geektrust.java
 * @author Akshara
 */
public class TestFamilyTree {
	RelationHandler relationHandler = new RelationHandler();
	RelationHandler relationHandlerMock = Mockito.mock(RelationHandler.class);
	Person head = new Person("Shan", Gender.MALE);
	
	/**
	 * Tests method buildShanFamily()
	 */
	@Test
	public void testBuildShanFamily() {
		Person expectedPerson = new Person("Shan", Gender.MALE);
		Person actualPerson = relationHandler.buildShanFamily();
		assertEquals(expectedPerson.getName(), actualPerson.getName());
		assertEquals(expectedPerson.getGender(), actualPerson.getGender());
	}
	
	/**
	 * tests method searchMember()
	 */
	@Test
	public void testSearchMember() {
		Person expectedPerson = new Person("Shan", Gender.MALE);
		Person actualPerson = relationHandler.searchMember(head, "Shan");
		assertEquals(expectedPerson.getName(), actualPerson.getName());
		assertEquals(expectedPerson.getGender(), actualPerson.getGender());
		assertEquals(expectedPerson.getFamily(), actualPerson.getFamily());
		assertEquals(expectedPerson.getParentFamily(), actualPerson.getParentFamily());
	}
	
	/**
	 * tests method addMember()
	 */
	@Test
	public void testAddMember() {
		Mockito.doNothing().when(relationHandlerMock)
			.addMember("Anga", "Shah", "Male", head);
		relationHandlerMock.addMember("Anga", "Shah", "Male", head);
	    Mockito.verify(relationHandlerMock, times(1)).addMember("Anga", "Shah", "Male", head);
	}
	
	/**
	 * tests method printList()
	 */
	@Test
	public void testPrintList() {
		Mockito.doNothing().when(relationHandlerMock).printList(new ArrayList<>());
		relationHandlerMock.printList(new ArrayList<>());
		Mockito.verify(relationHandlerMock, times(1)).printList(new ArrayList<>());
	}

	/**
	 * Tests method getKids() for son 
	 */
	@Test
	public void testGetKidsSon() {
		List<Person> sonsList = new ArrayList<>();
		head.addMarriage(new Person("Anga", Gender.FEMALE));
		head.addSon("Chit");
		head.addDaughter("Satya");
		sonsList.add(relationHandler.searchMember(head, "Chit"));
		List<Person> actualSonList = relationHandler.getKids(head, Gender.MALE);
		assertEquals(sonsList, actualSonList);
	}
	
	/**
	 * Tests method getKids() for daughter
	 */
	@Test
	public void testGetKidsDaughter() {
		List<Person> daughtersList = new ArrayList<>();
		head.addMarriage(new Person("Anga", Gender.FEMALE));
		head.addSon("Chit");
		head.addDaughter("Satya");
		daughtersList.add(relationHandler.searchMember(head, "Satya"));
		List<Person> actualDaughtersList = relationHandler.getKids(head, Gender.FEMALE);
		assertEquals(daughtersList, actualDaughtersList);
	}
	
	/**
	 * Tests the result if there is no children
	 */
	@Test
	public void testGetKidsNone() {
		List<Person> kidsList = new ArrayList<>();
		head.addMarriage(new Person("Anga", Gender.FEMALE));
		List<Person> actualDaughtersList = relationHandler.getKids(head, Gender.FEMALE);
		assertEquals(kidsList, actualDaughtersList);
	}

	/**
	 * Tests method getAuntUncle for Paternal-uncle
	 */
	@Test
	public void testGetUncle() {
		List<Person> uncleList = new ArrayList<>();
		head.addMarriage(new Person("Anga", Gender.FEMALE));
		head.addSon("Chit");
		head.addDaughter("Satya");
		Person satya = relationHandler.searchMember(head, "Satya");
		satya.addMarriage(new Person("Vyan", Gender.MALE));
		satya.addSon("Asva");
		uncleList.add(relationHandler.searchMember(head, "Chit"));
		List<Person> actualUncleList = relationHandler.getAuntUncle(satya, Gender.MALE);
		assertEquals(uncleList, actualUncleList);
	}
	
	/**
	 * Tests method getAuntUncle for Maternal-aunt
	 */
	@Test
	public void testGetAunt() {
		List<Person> auntList = new ArrayList<>();
		head.addMarriage(new Person("Anga", Gender.FEMALE));
		head.addSon("Chit");
		head.addDaughter("Satya");
		Person chit = relationHandler.searchMember(head, "Chit");
		chit.addMarriage(new Person("Amba", Gender.FEMALE));
		chit.addDaughter("Dritha");
		auntList.add(relationHandler.searchMember(head, "Satya"));
		List<Person> actualAuntList = relationHandler.getAuntUncle(chit, Gender.FEMALE);
		assertEquals(auntList, actualAuntList);
	}

	/**
	 * Tests method testGetBrotherInLaw() for bother-in-law
	 */
	@Test
	public void testGetBrotherInLaw() {
		List<Person> brotherInLawList = new ArrayList<>();
		head.addMarriage(new Person("Anga", Gender.FEMALE));
		head.addSon("Chit");
		head.addDaughter("Satya");
		Person satya = relationHandler.searchMember(head, "Satya");
		satya.addMarriage(new Person("Vyan", Gender.MALE));
		brotherInLawList.add(relationHandler.searchMember(head, "Chit"));
		Person vyan = relationHandler.searchMember(head, "Vyan");
		List<Person> actualBrotherInLawList = relationHandler.getInLaws(vyan, Gender.MALE);
		assertEquals(brotherInLawList, actualBrotherInLawList);
	}
	
	/**
	 * Tests method testGetBrotherInLaw() for sister-in-law
	 */
	@Test
	public void testGetSisterInLaw() {
		List<Person> sisterInLawList = new ArrayList<>();
		head.addMarriage(new Person("Anga", Gender.FEMALE));
		head.addSon("Chit");
		head.addDaughter("Satya");
		Person chit = relationHandler.searchMember(head, "Chit");
		chit.addMarriage(new Person("Amba", Gender.FEMALE));
		sisterInLawList.add(relationHandler.searchMember(head, "Satya"));
		Person amba = relationHandler.searchMember(head, "Amba");
		List<Person> actualSisterInLawList = relationHandler.getInLaws(amba, Gender.FEMALE);
		assertEquals(sisterInLawList, actualSisterInLawList);
	}

	/**
	 * Tests method testGetRelation() 
	 */
	@Test
	public void testGetRelation() {
		Mockito.doNothing().when(relationHandlerMock).getRelation("", "", head);
		relationHandlerMock.getRelation("", "", head);
		Mockito.verify(relationHandlerMock, times(1)).getRelation("", "", head);
	}
}
<file_sep>/CyclePriceCalculator/Model/Components/Wheels/Wheels.java
package Model.Components.Wheels;

public class Wheels {
	private Spokes[] spokes;
	private Rim[] rim;
	private Tube[] tube;
	private Tyre[] tyre;

	public synchronized Spokes[] getSpokes() {
		return spokes;
	}

	public synchronized void setSpokes(Spokes[] spokes) {
		this.spokes = spokes;
	}

	public synchronized Rim[] getRim() {
		return rim;
	}

	public synchronized void setRim(Rim[] rim) {
		this.rim = rim;
	}

	public synchronized Tube[] getTube() {
		return tube;
	}

	public synchronized void setTube(Tube[] tube) {
		this.tube = tube;
	}

	public synchronized Tyre[] getTyre() {
		return tyre;
	}

	public synchronized void setTyre(Tyre[] tyre) {
		this.tyre = tyre;
	}
}
