public void TestReverseMapping()
        {
            // given
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(
                @"<PriorityMappings>
            <Mapping>
              <JIRAPriority id='1'>Blocker</JIRAPriority>
              <VersionOnePriority id='WorkitemPriority:140'>High</VersionOnePriority>
            </Mapping>
            <Mapping>
              <JIRAPriority id='2'>Critical</JIRAPriority>
              <VersionOnePriority id='WorkitemPriority:140'>High</VersionOnePriority>
            </Mapping>
            <Mapping>
              <JIRAPriority id='3'>Major</JIRAPriority>
              <VersionOnePriority id='WorkitemPriority:139'>Medium</VersionOnePriority>
            </Mapping>
              </PriorityMappings>");

            XmlElement inputConfiguration = doc.DocumentElement;

            Dictionary<MappingInfo, MappingInfo> mapping = new Dictionary<MappingInfo, MappingInfo>();
            Dictionary<MappingInfo, MappingInfo> reverseMapping = new Dictionary<MappingInfo, MappingInfo>();
            var v1priority = new MappingInfo("WorkitemPriority:140", "High");

            //when
            ConfigurationReader.ProcessMappingSettings(mapping, reverseMapping, inputConfiguration, "JIRAPriority", "VersionOnePriority");

            //then
            Assert.AreEqual(3, mapping.Count);
            Assert.AreEqual("Blocker", reverseMapping[v1priority].Name);
            Assert.AreNotEqual("Critical", reverseMapping[v1priority].Name);

            foreach (KeyValuePair<MappingInfo, MappingInfo> pair in mapping) {
                Console.WriteLine(string.Format("{0}[{1}] maps to {2}[{3}]", pair.Key.Name, pair.Key.Id, pair.Value.Name, pair.Value.Id));
            }
        }
		private BugzillaServiceConfiguration GetStockConfig()
		{
			BugzillaServiceConfiguration config = new BugzillaServiceConfiguration();
			config.UserName = userName;
			config.Password = password;
			config.Url = expectedUrl;
			config.OpenIssueFilterId = expectedFilterId;

            MappingInfo zillaProject = new MappingInfo(productId.ToString(), productName);
            MappingInfo v1Project = new MappingInfo(v1ProjectId, null);
            config.ProjectMappings.Add(zillaProject, v1Project);
    
            MappingInfo zillaPriority = new MappingInfo(null, expectedPriority);
            MappingInfo v1Priority = new MappingInfo(v1PriorityId, null);
            config.PriorityMappings.Add(zillaPriority, v1Priority);

			return config;
		}
        private static ClearQuestServiceConfiguration CreateConfig()
        {
            ClearQuestServiceConfiguration config = new ClearQuestServiceConfiguration();
            config.SourceFieldValue = DefectSource;
            config.WebUrlTemplate = "http://example.com/defect/#defectid#";
            config.WebUrlTitle = "Link to defect";

            config.ClearQuestEntityType   = "defect";
            config.IdField                = "id";
            config.DefectTitleField       = "Headline";
            config.DescriptionField       = "Description";
            config.ProjectNameField       = "Project.Name";
            config.OwnerLoginField        = "Owner.login_name";
            config.StateField             = "State";
            config.ClearQuestPriorityField= "Priority";
            config.ClearQuestModifyAction = "modify";

            //Priority mapping data
            MappingInfo cqPriority1 = new MappingInfo(null, "CQ Priority 1");
            MappingInfo cqPriority2 = new MappingInfo(null, ClearQuestPriorityName);
            MappingInfo v1Priority1 = new MappingInfo("WorkitemPriority:1", "V1 Priority 1");
            MappingInfo v1Priority2 = new MappingInfo(VersionOnePriorityId, "V1 Priority 2");
            config.PriorityMappings.Add(cqPriority1, v1Priority1);
            config.PriorityMappings.Add(cqPriority2, v1Priority2);

            //Project mapping data
            MappingInfo cqProject1 = new MappingInfo(null, "CQ Project 1");
            MappingInfo cqProject2 = new MappingInfo(null, ClearQuestProjectName);
            MappingInfo v1Project1 = new MappingInfo("Scope:1", "V1 Project 1");
            MappingInfo v1Project2 = new MappingInfo(VersionOneProjectId, "V1 Project 2");
            config.ProjectMappings.Add(cqProject1, v1Project1);
            config.ProjectMappings.Add(cqProject2, v1Project2);

            return config;
        }