public Test(){
		//initialize logger
		org.apache.log4j.BasicConfigurator.configure();

		_log.info("Please log-in to upload data.");
		SessionForm sf = new SessionForm();

		sf.showDialog();
		try{
			mutex.acquire();
		} catch(InterruptedException ie){
			_log.error(ie.getMessage());
		}

		sf.dispose();

		if(mainUsername==null || mainPassword==null){
			_log.error("You must log-in sucessfully before continuing.");
			_log.info("Exit Program!");
			System.exit(0);
		}

		boolean isInputError = false;
		HashSet<String> errorFeeds = new HashSet<String>();
		ArrayList<AgencyInfo> ais = new ArrayList<AgencyInfo>();
		ArrayList<ArrayList<GenericGtfsData>> gtfsAgenciesData = new ArrayList<ArrayList<GenericGtfsData>>();
		_log.info("Reading 'AgencyInfo.csv'");
		ais.addAll(readAgencyInfo(System.getProperty("user.dir")+System.getProperty("file.separator")+"AgencyInfo.csv"));
		_log.info(ais.size()+" GTFS feeds to be processed.");

		factory = new XmlBeanFactory(new FileSystemResource(System.getProperty("user.dir")+System.getProperty("file.separator")+"data-source.xml"));

		for(int i=0; i<ais.size(); i++){
			AgencyInfo ai = ais.get(i);
			try {
				ArrayList<GenericGtfsData> gtfsAgencyData = new ArrayList<GenericGtfsData>();
				gtfsAgencyData.addAll(getDataFromAgency(ai));
				gtfsAgenciesData.add(gtfsAgencyData);
			} catch (IOException e){
				errorFeeds.add(ai.getName());
				_log.error("Error reading input from "+ai.getName());
				_log.error(e.getMessage());
				isInputError = true;
				continue;
			}
		}

		if(!isInputError){
			_log.info("Complete checking and reading "+ais.size()+" GTFS feeds.");
			_log.info("Start to upload data.");
			uploadAgenciesData(gtfsAgenciesData, mainUsername, mainPassword);
		} else {
			_log.info("Please check agency dataset from "+errorFeeds.toString()+" again! No data will be uploaded.");
		}
	}