}
public static void main(String[] args) {
TwistInfo twistInfo = new TwistInfo();
twistInfo.addPatternPair(new PatternPair("qa1", "qa2"));
System.out.println(twistInfo.getTwistedValue("http://qa2.google.com"));
System.out.println(twistInfo.getTwistedValue("http://uat.google.com"));
twistInfo.addPatternPair(new PatternPair("uat.google.com", "qa.google.com"));
System.out.println(twistInfo.getTwistedValue("http://uat.google.com"));
twistInfo = new TwistInfo();
System.out.println(twistInfo.getTwistedValue("http://uat.google.com"));
twistInfo.addPatternPair(new PatternPair("uat.google.com", null));
System.out.println(twistInfo.getTwistedValue("http://uat.google.com"));
twistInfo = new TwistInfo();
System.out.println(twistInfo.getTwistedValue("http://uat.google.com"));
twistInfo.addPatternPair(new PatternPair("qa3.google.com", "qa4.google.com"));
System.out.println(twistInfo.getTwistedValue("http://uat.google.com"));
twistInfo = new TwistInfo();
twistInfo.addPatternPair(new PatternPair("qa3.google.com", "qa4.google.com"));
twistInfo.addPatternPair(new PatternPair("uat.google.com", "qa4.google.com"));
twistInfo.addPatternPair(new PatternPair(null, "qa4.google.com"));
System.out.println(twistInfo.getTwistedValue("http://uat.google.com"));
}