public void test()
    {
        System.out.println("Running PersonalRentalCarRuleTest");
        boolean success = false;
        Form f = new Form("1", 1, "1");
        FormParser parser = new FormParser();


        //test a not on same day
        Map<String, String> sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_TRANSPORTATION", "3");
        sampleForm.put("TRANSPORTATION1_DATE", "20121108");
        sampleForm.put("TRANSPORTATION1_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION1_RENTAL", "yes");
        sampleForm.put("TRANSPORTATION1_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION1_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION1_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION2_DATE", "20121109");
        sampleForm.put("TRANSPORTATION2_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION2_RENTAL", "no");
        sampleForm.put("TRANSPORTATION2_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION2_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION2_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION3_DATE", "20121110");
        sampleForm.put("TRANSPORTATION3_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION3_RENTAL", "no");
        sampleForm.put("TRANSPORTATION3_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION3_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION3_CARRIER", "Southwest Airlines");
        f.inputData = sampleForm;



        try
        {
            parser.parseTransportationExpenses(f);

            new PersonalRentalCarRule().applyRule(f);
        }
        catch(ParseException e)
        {
            System.out.println(e.getError());
        }
        catch(RuleException e)
        {
            assert false : "PersonalRentalCarRule doesn't work";
        }

        //test 2 rentals on same day
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_TRANSPORTATION", "3");
        sampleForm.put("TRANSPORTATION1_DATE", "20121108");
        sampleForm.put("TRANSPORTATION1_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION1_RENTAL", "yes");
        sampleForm.put("TRANSPORTATION1_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION1_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION1_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION2_DATE", "20121108");
        sampleForm.put("TRANSPORTATION2_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION2_RENTAL", "yes");
        sampleForm.put("TRANSPORTATION2_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION2_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION2_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION3_DATE", "20121110");
        sampleForm.put("TRANSPORTATION3_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION3_RENTAL", "no");
        sampleForm.put("TRANSPORTATION3_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION3_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION3_CARRIER", "Southwest Airlines");
        f.inputData = sampleForm;



        try
        {
            parser.parseTransportationExpenses(f);

            new PersonalRentalCarRule().applyRule(f);
        }
        catch(ParseException e)
        {
            System.out.println(e.getError());
        }
        catch(RuleException e)
        {
            assert false : "PersonalRentalCarRule doesn't work";
        }

        //test 2 personals on same day
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_TRANSPORTATION", "3");
        sampleForm.put("TRANSPORTATION1_DATE", "20121108");
        sampleForm.put("TRANSPORTATION1_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION1_RENTAL", "no");
        sampleForm.put("TRANSPORTATION1_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION1_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION1_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION2_DATE", "20121108");
        sampleForm.put("TRANSPORTATION2_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION2_RENTAL", "no");
        sampleForm.put("TRANSPORTATION2_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION2_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION2_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION3_DATE", "20121110");
        sampleForm.put("TRANSPORTATION3_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION3_RENTAL", "no");
        sampleForm.put("TRANSPORTATION3_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION3_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION3_CARRIER", "Southwest Airlines");
        f.inputData = sampleForm;



        try
        {
            parser.parseTransportationExpenses(f);

            new PersonalRentalCarRule().applyRule(f);
        }
        catch(ParseException e)
        {
            System.out.println(e.getError());
        }
        catch(RuleException e)
        {
            assert false : "PersonalRentalCarRule doesn't work";
        }


        //test 1 of each on same day
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_TRANSPORTATION", "3");
        sampleForm.put("TRANSPORTATION1_DATE", "20121108");
        sampleForm.put("TRANSPORTATION1_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION1_RENTAL", "yes");
        sampleForm.put("TRANSPORTATION1_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION1_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION1_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION2_DATE", "20121108");
        sampleForm.put("TRANSPORTATION2_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION2_RENTAL", "no");
        sampleForm.put("TRANSPORTATION2_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION2_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION2_CARRIER", "Southwest Airlines");

        sampleForm.put("TRANSPORTATION3_DATE", "20121110");
        sampleForm.put("TRANSPORTATION3_TYPE", "CAR");
        sampleForm.put("TRANSPORTATION3_RENTAL", "no");
        sampleForm.put("TRANSPORTATION3_AMOUNT", "12.79");
        sampleForm.put("TRANSPORTATION3_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION3_CARRIER", "Southwest Airlines");
        f.inputData = sampleForm;


        success = false;
        try
        {
            parser.parseTransportationExpenses(f);

            new PersonalRentalCarRule().applyRule(f);
        }
        catch(ParseException e)
        {
            System.out.println(e.getError());
        }
        catch(RuleException e)
        {
            success = true;
        }
        assert success : "Didnt catch personal and rental car on same day";



        System.out.println("Passed!");
    }