### Question:
ArrayUtils { public static int getBit(final byte[] h, final int i) { return (h[i >> 3] >> (i & 7)) & 1; } private  ArrayUtils(); static byte[] duplicate(final byte[] src); static byte[] concat(final byte[]... arrays); static byte[][] split(final byte[] bytes, final int splitIndex); static byte[] toByteArray(final BigInteger value, final int numBytes); static BigInteger toBigInteger(final byte[] bytes); static int isEqualConstantTime(final byte[] b, final byte[] c); static int compare(final byte[] b, final byte[] c); static int getBit(final byte[] h, final int i);  }### Answer:
@Test public void getBitReturnZeroIfBitIsNotSet() { MatcherAssert.assertThat(ArrayUtils.getBit(new byte[] {0}, 0), IsEqual.equalTo(0)); MatcherAssert.assertThat(ArrayUtils.getBit(new byte[] {1, 2, 3}, 15), IsEqual.equalTo(0)); }
@Test public void getBitReturnOneIfBitIsSet() { MatcherAssert.assertThat(ArrayUtils.getBit(new byte[] {8}, 3), IsEqual.equalTo(1)); MatcherAssert.assertThat(ArrayUtils.getBit(new byte[] {1, 2, 3}, 9), IsEqual.equalTo(1)); MatcherAssert.assertThat(ArrayUtils.getBit(new byte[] {1, 2, 3}, 16), IsEqual.equalTo(1)); }