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


        //test inside USA + all DOD
        Map<String, String> sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_TRANSPORTATION", "3");
        sampleForm.put("TRANSPORTATION1_DATE", "20121101");
        sampleForm.put("TRANSPORTATION2_DATE", "20121111");
        sampleForm.put("TRANSPORTATION3_DATE", "20121121");
        sampleForm.put("TRANSPORTATION1_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION1_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION1_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION2_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION2_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION2_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION3_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION3_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION3_CURRENCY", "USD");
        sampleForm.put("NUM_DAYS", "3");
        sampleForm.put("DAY1_LUNCH_COUNTRY", "USA");
        sampleForm.put("DAY2_LUNCH_COUNTRY", "USA");
        sampleForm.put("DAY3_LUNCH_COUNTRY", "USA");
        f.inputData = sampleForm;
        
        List<Grant> grants = new ArrayList<Grant>();
        for (int i = 0; i < 3; ++i) {
        	grants.add(new Grant());
        	grants.get(i).organizationType = "DOD";
        }
        f.attachedGrants = grants;



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

        //test outside USA + all DOD
        success = false;
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_TRANSPORTATION", "3");
        sampleForm.put("TRANSPORTATION1_DATE", "20121101");
        sampleForm.put("TRANSPORTATION2_DATE", "20121111");
        sampleForm.put("TRANSPORTATION3_DATE", "20121121");
        sampleForm.put("TRANSPORTATION1_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION1_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION1_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION2_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION2_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION2_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION3_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION3_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION3_CURRENCY", "USD");
        sampleForm.put("NUM_DAYS", "3");
        sampleForm.put("DAY1_LUNCH_COUNTRY", "CHN");
        sampleForm.put("DAY2_LUNCH_COUNTRY", "CAN");
        sampleForm.put("DAY3_LUNCH_COUNTRY", "CHN");
        f.inputData = sampleForm;
        
        grants = new ArrayList<Grant>();
        for (int i = 0; i < 3; ++i) {
        	grants.add(new Grant());
        	grants.get(i).organizationType = "DOD";
        }
        f.attachedGrants = grants;

        try
        {
            parser.parseTransportationExpenses(f);
            new DODCheckRule().applyRule(f);
        }
        catch(ParseException e)
        {
            System.out.println(e.getError());
        }
        catch(RuleException e)
        {
            success = true;
        }

        
        
       //test a non-DOD
        success = false;
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_TRANSPORTATION", "3");
        sampleForm.put("TRANSPORTATION1_DATE", "20121101");
        sampleForm.put("TRANSPORTATION2_DATE", "20121111");
        sampleForm.put("TRANSPORTATION3_DATE", "20121121");
        sampleForm.put("TRANSPORTATION1_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION1_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION1_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION2_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION2_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION2_CURRENCY", "USD");
        sampleForm.put("TRANSPORTATION3_TYPE", "AIR");
        sampleForm.put("TRANSPORTATION3_AMOUNT", "111.1");
        sampleForm.put("TRANSPORTATION3_CURRENCY", "USD");
        sampleForm.put("NUM_DAYS", "3");
        sampleForm.put("DAY1_LUNCH_COUNTRY", "CHN");
        sampleForm.put("DAY2_LUNCH_COUNTRY", "CAN");
        sampleForm.put("DAY3_LUNCH_COUNTRY", "CHN");
        f.inputData = sampleForm;
        
        grants = new ArrayList<Grant>();
        for (int i = 0; i < 3; ++i) {
        	grants.add(new Grant());
        	grants.get(i).organizationType = "noExport";
        }
        f.attachedGrants = grants;

        try
        {
            parser.parseTransportationExpenses(f);
            new DODCheckRule().applyRule(f);
        }
        catch(ParseException e)
        {
            System.out.println(e.getError());
        }
        catch(RuleException e)
        {
            success = true;
        }



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