@Test
public void bigIntegerToBytes_singleByteSignDoesNotFit() {

    BigInteger b = BigInteger.valueOf(0b1000_0000);     // 128 (2-compl does not fit in one byte)
    byte[] expected = new byte[]{-128};                 // -128 == 1000_0000 (compl-2)
    byte[] actual = Utils.bigIntegerToBytes(b, 1);
    assertTrue(Arrays.equals(expected, actual));
}