package com.fishercoder;

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

public class _31Test {
    private static _31.Solution1 solution1;
    private static int[] nums;

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

    @Test
    public void test1() {
        nums = new int[]{1, 2, 3};
        solution1.nextPermutation(nums);
        CommonUtils.printArray(nums);
    }
}

@@ -23,57 +23,8 @@
 r;%0A%0A
-import com.fishercoder.common.utils.CommonUtils;%0A
 impo
@@ -57,16 +57,16 @@
 ns._31;%0A
+
 import o
@@ -111,16 +111,67 @@
 .Test;%0A%0A
+import static org.junit.Assert.assertArrayEquals;%0A%0A
 public c
@@ -483,31 +483,426 @@
     
-CommonUtils.printArray(
+assertArrayEquals(new int%5B%5D%7B1, 3, 2%7D, nums);%0A    %7D%0A%0A    @Test%0A    public void test2() %7B%0A        nums = new int%5B%5D%7B1, 2, 4, 6, 3%7D;%0A        solution1.nextPermutation(nums);%0A        assertArrayEquals(new int%5B%5D%7B1, 2, 6, 3, 4%7D, nums);%0A    %7D%0A%0A    @Test%0A    public void test3() %7B%0A        nums = new int%5B%5D%7B1, 2, 4, 6, 3, 2, 1%7D;%0A        solution1.nextPermutation(nums);%0A        assertArrayEquals(new int%5B%5D%7B1, 2, 6, 1, 2, 3, 4%7D, 
 nums

add more tests for 31