package com.fishercoder;

import com.fishercoder.common.utils.CommonUtils;
import com.fishercoder.solutions._332;
import org.junit.BeforeClass;
import org.junit.Test;

import java.util.List;

public class _332Test {
  private static _332.Solution1 solution1;
  private static String[][] tickets;
  private static List<String> expected;

  @BeforeClass
  public static void setup() {
    solution1 = new _332.Solution1();
  }

  @Test
  public void test1() {
    tickets = new String[][] {{"MUC", "LHR"}, {"JFK", "MUC"}, {"SFO", "SJC"}, {"LHR", "SFO"}};
    expected = solution1.findItinerary(tickets);
    CommonUtils.print(expected);
  }

  @Test
  public void test2() {
    tickets = new String[][] {{"JFK", "SFO"}, {"JFK", "ATL"}, {"SFO", "ATL"}, {"ATL", "JFK"},
        {"ATL", "SFO"}};
    expected = solution1.findItinerary(tickets);
    CommonUtils.print(expected);
  }
}

@@ -161,16 +161,69 @@
 .Test;%0A%0A
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0A
 import j
@@ -262,16 +262,18 @@
 2Test %7B%0A
+  
   privat
@@ -307,16 +307,18 @@
 ution1;%0A
+  
   privat
@@ -326,26 +326,34 @@
  static 
+List%3CList%3C
 String
-%5B%5D%5B%5D
+%3E%3E
  tickets
@@ -354,16 +354,18 @@
 ickets;%0A
+  
   privat
@@ -397,16 +397,18 @@
 ected;%0A%0A
+  
   @Befor
@@ -414,16 +414,18 @@
 reClass%0A
+  
   public
@@ -451,16 +451,20 @@
 ) %7B%0A    
+  
+  
 solution
@@ -489,29 +489,35 @@
 ion1();%0A
+  
   %7D%0A%0A  
+ 
+ 
 @Test%0A
+  
   public
@@ -528,24 +528,28 @@
 d test1() %7B%0A
+    
     tickets 
@@ -558,69 +558,207 @@
 new 
-String%5B%5D%5B%5D %7B%7B%22MUC%22, %22LHR%22%7D, %7B%22JFK%22, %22MUC%22%7D, %7B%22SFO%22, %22SJC%22%7D, %7B
+ArrayList%3C%3E();%0A        tickets.add(Arrays.asList(%22MUC%22, %22LHR%22));%0A        tickets.add(Arrays.asList(%22JFK%22, %22MUC%22));%0A        tickets.add(Arrays.asList(%22SFO%22, %22SJC%22));%0A        tickets.add(Arrays.asList(
 %22LHR
@@ -757,36 +757,40 @@
 ist(%22LHR%22, %22SFO%22
-%7D%7D
+))
 ;%0A
+    
     expected = s
@@ -814,32 +814,36 @@
 erary(tickets);%0A
+    
     CommonUtils.
@@ -863,21 +863,27 @@
 d);%0A
+  
   %7D%0A%0A  
+ 
+ 
 @Test%0A
+  
   pu
@@ -902,24 +902,28 @@
 st2() %7B%0A    
+  
+  
 tickets = ne
@@ -928,69 +928,207 @@
 new 
-String%5B%5D%5B%5D %7B%7B%22JFK%22, %22SFO%22%7D, %7B%22JFK%22, %22ATL%22%7D, %7B%22SFO%22, %22ATL%22%7D, %7B
+ArrayList%3C%3E();%0A        tickets.add(Arrays.asList(%22JFK%22, %22SFO%22));%0A        tickets.add(Arrays.asList(%22JFK%22, %22ATL%22));%0A        tickets.add(Arrays.asList(%22SFO%22, %22ATL%22));%0A        tickets.add(Arrays.asList(
 %22ATL
@@ -1139,10 +1139,11 @@
 JFK%22
-%7D,
+));
 %0A   
@@ -1147,17 +1147,42 @@
         
-%7B
+tickets.add(Arrays.asList(
 %22ATL%22, %22
@@ -1189,16 +1189,20 @@
 SFO%22
-%7D%7D;%0A
+));%0A  
     
+  
 expe
@@ -1238,24 +1238,28 @@
 y(tickets);%0A
+    
     CommonUt
@@ -1279,14 +1279,16 @@
 ected);%0A
+  
   %7D%0A%7D%0A

update tests for 332