import org.junit.Test;

import java.util.ArrayList;

import static org.junit.Assert.*;

public class DigitNumberTest {

    @Test
    public void replaceDigits() throws Exception {
        assertEquals(123406789L, DigitNumber.replaceDigit(123456789, 4, 0));
        assertEquals(923456789L, DigitNumber.replaceDigit(123456789, 0, 9));
        assertEquals(123456788L, DigitNumber.replaceDigit(123456789, 8, 8));
    }

    @Test
    public void replaceDigit() throws Exception {
        ArrayList<int[]> replacements = new ArrayList<>();
        replacements.add(new int[] {3, 0});
        replacements.add(new int[] {4, 0});
        replacements.add(new int[] {5, 0});
        assertEquals(123000789L, DigitNumber.replaceDigits(123456789, replacements));
        replacements.clear();
        replacements.add(new int[] {0, 9});
        replacements.add(new int[] {1, 8});
        replacements.add(new int[] {2, 7});
        assertEquals(987456789L, DigitNumber.replaceDigits(123456789, replacements));
    }
}
@@ -565,17 +565,16 @@
 ew int%5B%5D
- 
 %7B3, 0%7D);
@@ -608,17 +608,16 @@
 ew int%5B%5D
- 
 %7B4, 0%7D);
@@ -651,17 +651,16 @@
 ew int%5B%5D
- 
 %7B5, 0%7D);
@@ -810,17 +810,16 @@
 ew int%5B%5D
- 
 %7B0, 9%7D);
@@ -853,17 +853,16 @@
 ew int%5B%5D
- 
 %7B1, 8%7D);
@@ -896,17 +896,16 @@
 ew int%5B%5D
- 
 %7B2, 7%7D);
@@ -997,9 +997,447 @@
 ;%0A    %7D%0A
-%7D
+%0A    @Test%0A    public void getSortedDigits() throws Exception %7B%0A        char%5B%5D chars = new char%5B%5D%7B'0', '1', '2', '3', '4', '5', '6', '7'%7D;%0A        assertArrayEquals(chars, DigitNumber.getSortedDigits(76543210));%0A        assertArrayEquals(chars, DigitNumber.getSortedDigits(32107654));%0A        assertArrayEquals(chars, DigitNumber.getSortedDigits(12345670));%0A        assertArrayEquals(chars, DigitNumber.getSortedDigits(10234567));%0A    %7D%0A%7D%0A

add unit test for getSortedDigits()