Test fixture wont initialise an array
<p>I am trying to test my journey class methods, however, any method that uses the jArray field gives a null pointer exception as the arraylist has not actually been created. I was under the impression that my test fixture would address this yet the problem persists, any help appreciated.</p>

<pre><code>private buscard.Journey tj1;
    private buscard.Journey tj2;


    /**
     * Default constructor for test class JourneyTest
     */
    public JourneyTest()
    {
       tj1 = new buscard.Journey(20120101, 120000, "74", 1);
        tj2 = new buscard.Journey(20120102, 120000, "74", 1);
        ArrayList&lt;Journey&gt; jArray = new ArrayList&lt;Journey&gt;();
        jArray.add(tj1); 
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    protected void setUp()
    {
        tj1 = new buscard.Journey(20120101, 120000, "74", 1);
        tj2 = new buscard.Journey(20120102, 120000, "74", 1);
        ArrayList&lt;Journey&gt; jArray = new ArrayList&lt;Journey&gt;();
        jArray.add(tj1);
    }
    public void testGetDate()
    {
        Journey testJ1 = new Journey(20120101, 12.00, "74", 1); 
        assertEquals(20120101, testJ1.getDate());
    }
    public void testGetTime(){
        Journey testJ1 = new Journey(20120101, 12.00, "74", 1);
        assertEquals(12.0, testJ1.getTime());
    }
    public void testGetBusNumber(){
        Journey testJ1 = new Journey(20120101, 12.00, "74", 1);
        assertEquals("74", testJ1.getBusNumber());

    }
    public void testConstructor(){
       Journey testJ1 = new Journey(20120101, 12.00, "74", 1);
       assertEquals("74", testJ1.getBusNumber());
       assertEquals(12.0, testJ1.getTime());
       assertEquals(20120101, testJ1.getDate());
    }  

}
package buscard; 
import java.util.ArrayList;
/**
 * Write a description of class journey here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
class Journey
{
    public int date;
    public double time;
    public String busNumber;
    public int journeyType;
    public static double dayCharge = 0;
    public static final double maxDayCharge = 3.50;
    public static double weekCharge = 0;
    public static final double maxWeekCharge = 15;
    public static double monthCharge = 0;
    public static final double maxMonthCharge = 48;
    private int journeyNumber;
    private static int numberOfJourneys = 0;
    public double costOfJourney; 
    public static ArrayList&lt;Journey&gt; jArray;


    public Journey(int date, double time, String busNumber, int journeyType)
    {
        this.date = date;
        this.time = time;
        this.busNumber = busNumber;
        this.journeyType = journeyType;      
        journeyNumber = ++numberOfJourneys;

    }

    static
    {
      ArrayList&lt;Journey&gt; jArray = new ArrayList&lt;Journey&gt;();               
    }

    public int getDate(){
        return date;
    }  

    public double getTime(){
        return time;
    }

    public String getBusNumber(){
        return busNumber;
    }

    public double getCostOfJourney(){
        return costOfJourney;
    }

    public int getJourneyType(){
        return journeyType;
    }
    public boolean isInSequence(int date, double time){
        Journey prevJourney = jArray.get(jArray.size()-1);
        return((prevJourney.getDate() &lt; date)||(prevJourney.getDate() == date &amp;&amp; prevJourney.time &lt; time));                       
    }           

    public static double returnLeast(){
        double d = maxDayCharge - dayCharge;
        double m = maxMonthCharge - monthCharge;
        double w = maxWeekCharge - weekCharge; 
        double least = 0;
        if (d &lt;= w &amp;&amp; d &lt;= m)
        {
             least = d;
        }
        else if(w &lt;= d &amp;&amp; w &lt;= m)
        {
             least = w;
        }
        else if(m &lt;= d &amp;&amp; m &lt;= w)
        {
             least = m;
        }

        return least;
    }

        public double journeyCost(Journey reqJourney){                   
        if (journeyType == 1){                                 
            if (dayCharge &lt;= 2.50 &amp;&amp; weekCharge &lt;= 14 &amp;&amp; monthCharge &lt;= 47)
            {
                costOfJourney = 1;
            }
            else 
            {
                costOfJourney = returnLeast();
            }

        }
        else if (journeyType == 2)
        {
            if (dayCharge &lt;= 1.80 &amp;&amp; weekCharge &lt;= 13.30 &amp;&amp; monthCharge &lt;= 46.30)
            {
                costOfJourney = 1.70;
            }
            else 
            {
                costOfJourney = returnLeast();
            }
        }
        else if (journeyType == 3)
        {
            if (dayCharge &lt;= 1.60 &amp;&amp; weekCharge &lt;= 13.10 &amp;&amp; monthCharge &lt;= 46.10)
            {
                costOfJourney = 1.90;
            }
            else 
            {
                costOfJourney = returnLeast();
            }

        }          
        return costOfJourney;    
    }

    public static void updateCurrentCharges(int date){
        int newDayOfYear = DateFunctions.getYearDay(date);
        int newWeekOfYear = DateFunctions.getYearWeek(date);
        int newMonthOfYear = DateFunctions.getYearMonth(date);

        if (newDayOfYear &gt; WmBusPass.dayOfYear)
        {
            WmBusPass.dayOfYear = newDayOfYear;
            dayCharge = 0;
        }
        if (newWeekOfYear &gt; WmBusPass.weekOfYear)
        {
            WmBusPass.weekOfYear = newWeekOfYear;
            weekCharge = 0;
        }
        if (newMonthOfYear &gt; WmBusPass.monthOfYear)
        {
            WmBusPass.monthOfYear = newMonthOfYear;
            monthCharge = 0;
        }
    } 

}
</code></pre>
