public void test()
    {
        System.out.println("Running ParseGrantsTester");
        Map<String, String> outputData = new HashMap<String, String>();
        Form form = new Form("1", 1, "1");
        FormParser parser = new FormParser();

        //test empty form
        Map<String, String> sampleForm = new HashMap<String, String>();
        List<Grant> grants = null;

        //test 1 grant
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_GRANTS", "1");
        sampleForm.put("TRAVEL_TYPE_DTC_SPONSORED", "yes");
        sampleForm.put("JUSTIFICATION_SPONSORED", "As");
        sampleForm.put("GRANT1_ACCOUNT", "010101010101");
        sampleForm.put("GRANT1_PERCENT", "100");
        form.inputData = sampleForm;

        try { parser.parseGrants(form); } catch (ParseException e) { System.out.println(e.getMessage()); assert(false); } catch(KeyNotFoundException e) { assert(false); }

        //test uneven > 100 grant percentage total
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_GRANTS", "2");
        sampleForm.put("TRAVEL_TYPE_DTC_SPONSORED", "yes");
        sampleForm.put("JUSTIFICATION_SPONSORED", "As");
        sampleForm.put("GRANT1_ACCOUNT", "010101010101");
        sampleForm.put("GRANT1_PERCENT", "90");
        sampleForm.put("GRANT2_ACCOUNT", "010101010101");
        sampleForm.put("GRANT2_PERCENT", "200");
        form.inputData = sampleForm;
        try { parser.parseGrants(form); }
        catch (ParseException e) { System.out.println(e.getError()); assert(true); }
        catch(KeyNotFoundException e) { System.out.println(e.getMessage()); assert(false); }

        //test uneven < 100 grant percentage total
        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_GRANTS", "2");
        sampleForm.put("TRAVEL_TYPE_DTC_SPONSORED", "yes");
        sampleForm.put("JUSTIFICATION_SPONSORED", "As");
        sampleForm.put("GRANT1_ACCOUNT", "010101010101");
        sampleForm.put("GRANT1_PERCENT", "90");
        sampleForm.put("GRANT2_ACCOUNT", "010101010101");
        sampleForm.put("GRANT2_PERCENT", "5");
        form.inputData = sampleForm;
        try { parser.parseGrants(form); } catch(ParseException e) { System.out.println(e.getError()); assert(true); }
        catch(KeyNotFoundException e) { System.out.println(e.getMessage()); assert(false); }
        //test multiple grants

        sampleForm = new HashMap<String, String>();
        sampleForm.put("NUM_GRANTS", "2");
        sampleForm.put("TRAVEL_TYPE_DTC_SPONSORED", "yes");
        sampleForm.put("JUSTIFICATION_SPONSORED", "As");
        sampleForm.put("GRANT1_ACCOUNT", "010101010101");
        sampleForm.put("GRANT1_PERCENT", "90");
        sampleForm.put("GRANT2_ACCOUNT", "010101010101");
        sampleForm.put("GRANT2_PERCENT", "10");
        form.inputData = sampleForm;
        try { parser.parseGrants(form); } catch(ParseException e) { System.out.println(e.getError()); assert(false); }
        catch(KeyNotFoundException e) { System.out.println(e.getMessage()); assert(false); }



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