@Test
public void success_toBinaryArray() {

    BigInteger integer = new BigInteger("2");   // 00000010
    BigInteger integer1 = new BigInteger("17"); // 00010001
    BigInteger integer2 = new BigInteger("257"); // 0000000100000001
    BigInteger integer3 = new BigInteger("256"); // 0000000100000000
    int[] result = ArrayUtils.toBinaryArray(integer);
    int[] result1 = ArrayUtils.toBinaryArray(integer1);
    int[] result2 = ArrayUtils.toBinaryArray(integer2);
    int[] result3 = ArrayUtils.toBinaryArray(integer3);
    assertThat(result, is(new int[]{1, 0}));
    assertThat(result1, is(new int[]{1, 0, 0, 0, 1}));
    assertThat(result2, is(new int[]{1, 0, 0, 0, 0, 0, 0, 0, 1}));
    assertThat(result3, is(new int[]{1, 0, 0, 0, 0, 0, 0, 0, 0}));
}