### Question:
UtilConversion { public static boolean[] toBinary(int number, int length) { final boolean[] binary = new boolean[length]; for (int i = 0; i < length; i++) { binary[length - 1 - i] = (1 << i & number) != 0; } return binary; } private  UtilConversion(); static byte[] intToByteArray(int value); static int byteArrayToInt(byte[] bytes); static byte[] shortToByteArray(short value); static short byteArrayToShort(byte[] bytes); static byte fromUnsignedByte(short value); static short toUnsignedByte(byte value); static short fromUnsignedShort(int value); static int toUnsignedShort(short value); static int mask(int value); static int boolToInt(boolean value); static boolean[] toBinary(int number, int length); static int fromBinary(boolean[] binary); static boolean[] invert(boolean[] binary); static String toTitleCase(String string); static String toTitleCaseWord(String string);  }### Answer:
@Test void testToBinary() { assertArrayEquals(new boolean[1], UtilConversion.toBinary(0, 1)); assertArrayEquals(new boolean[4], UtilConversion.toBinary(0, 4)); assertArrayEquals(new boolean[] { true }, UtilConversion.toBinary(1, 1)); assertArrayEquals(new boolean[] { true, false }, UtilConversion.toBinary(2, 2)); }