### Question:
BitUtil { public static int bin2Int(String source) { if (source.startsWith("0b")) source = source.substring(2); return Integer.parseInt(source, 2); }  static String int2Bin(int source); static int bin2Int(String source); static String long2Bin(long source); static long bin2Long(String source); static boolean getIntBit(int source, int pos); static int setIntBit(int source, int pos, boolean value); static boolean getLongBit(long source, int pos); static long setLongBit(long source, int pos, boolean value);  }### Answer:
@Test public void bin2Int() { assertEquals(2147483647, BitUtil.bin2Int("111_1111_1111_1111_1111_1111_1111_1111".replace("_", ""))); assertEquals(2147483647, BitUtil.bin2Int("0b111_1111_1111_1111_1111_1111_1111_1111".replace("_", ""))); }