Access a List in JUnit Test Case
<p>I have this ParkingLot.java</p>

<pre><code> public class ParkingLot {

private final int size;
private Car[] slots = null;

List&lt;String&gt; list = new ArrayList&lt;String&gt;();

public ParkingLot(int size) {
    this.size = size;
    this.slots = new Car[size];
}

public List licenseWithAParticularColour(String colour) {
    for (int i = 0; i &lt; slots.length; i++) {
        if (slots[i].getColour() == colour) {
            System.out.println(slots[i].getLicense());
            list.add(slots[i].getLicense());
            return list;
        }
    }
    return null;
}
</code></pre>

<p>}</p>

<p>I have created a ParkingLotTest.java as follows</p>

<pre><code>public class ParkingLotTest {

private Car car1;
private Car car2;
private Car car3;

private Ticket ticket1;
private Ticket ticket2;
private Ticket ticket3;

private ParkingLot parkingLot;

private List&lt;String&gt; list = new ArrayList&lt;String&gt;();

@Before
public void intializeTestEnvironment() throws Exception {
    this.car1 = new Car("1234", "White");
    this.car2 = new Car("4567", "Black");
    this.car3 = new Car("0000", "Red");

    this.parkingLot = new ParkingLot(2);

    this.ticket1 = parkingLot.park(car1);
    this.ticket2 = parkingLot.park(car2);
    this.ticket3 = parkingLot.park(car3);
    this.list = parkingLot.list;


}

@Test
public void shouldGetLicensesWithAParticularColour() throws Exception {
    assertEquals(, parkingLot.licenseWithAParticularColour("White"));

}
</code></pre>

<p>}</p>

<p>In the above Test Case, I want to check that the List is filled with the correct Licenses. 
1. How do i create a field in the ParkingLotTest.java so that the List in the first class is same as list in the second class file.</p>
