### Question:
UtilConversion { public static int fromBinary(boolean[] binary) { Check.notNull(binary); int number = 0; for (final boolean current : binary) { number = number << 1 | boolToInt(current); } return number; } 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 testFromBinary() { assertEquals(0, UtilConversion.fromBinary(new boolean[1])); assertEquals(1, UtilConversion.fromBinary(new boolean[] { true })); assertEquals(2, UtilConversion.fromBinary(new boolean[] { true, false })); assertEquals(3, UtilConversion.fromBinary(new boolean[] { true, true })); assertEquals(4, UtilConversion.fromBinary(new boolean[] { true, false, false })); }