package pl.mk5.gdx.fireapp.android;

import android.os.Bundle;

import java.util.HashSet;
import java.util.Set;

public class TestUtils {
    // Copied from https://stackoverflow.com/a/13238729
    public static boolean equalBundles(Bundle one, Bundle two) {
        if(one.size() != two.size())
            return false;

        Set<String> setOne = new HashSet<>(one.keySet());
        setOne.addAll(two.keySet());
        Object valueOne;
        Object valueTwo;

        for(String key : setOne) {
            if (!one.containsKey(key) || !two.containsKey(key))
                return false;

            valueOne = one.get(key);
            valueTwo = two.get(key);
            if(valueOne instanceof Bundle && valueTwo instanceof Bundle &&
                    !equalBundles((Bundle) valueOne, (Bundle) valueTwo)) {
                return false;
            }
            else if(valueOne == null) {
                if(valueTwo != null)
                    return false;
            }
            else if(!valueOne.equals(valueTwo))
                return false;
        }

        return true;
    }
}

@@ -106,23 +106,16 @@
 l.Set;%0A%0A
-public 
 class Te
@@ -128,18 +128,62 @@
 s %7B%0A
-    // Cop
+%0A    private TestUtils() %7B%7D%0A%0A    // Copied and simplif
 ied 
@@ -451,58 +451,8 @@
 ());
-%0A        Object valueOne;%0A        Object valueTwo;
 %0A%0A  
@@ -587,24 +587,31 @@
             
+Object 
 valueOne = o
@@ -635,16 +635,23 @@
         
+Object 
 valueTwo
@@ -856,36 +856,24 @@
            %7D
-%0A           
  else if(val
@@ -973,28 +973,16 @@
        %7D
-%0A           
  else if
@@ -1009,16 +1009,18 @@
 lueTwo))
+ %7B
 %0A       
@@ -1034,32 +1034,46 @@
   return false;%0A
+            %7D%0A
         %7D%0A%0A     

Apply code review suggestions