@Test
public void bigIntToByteArray_approximate() throws Exception {

  int expectedSize = 2048;
  BigInteger bigInt = new BigInteger(2048, new Random());
  byte[] bigIntBytes = RsaKem.bigIntToByteArray(bigInt, expectedSize);
  assertThat(bigIntBytes).hasLength(expectedSize);
  assertThat(new BigInteger(1, bigIntBytes)).isEqualTo(bigInt);
}