### Question:
ByteUtil { public static int toUnsignedInt(final byte value) { final int intValue = value; if (intValue < 0) { return intValue + 256; } else { return intValue; } }  static int toUnsignedInt(final byte value); static byte toByteExact(final int value); static byte toByteExactUnsigned(final int value);  }### Answer:
@Test public void byteToUnsignedInt_0xff() { final int result = ByteUtil.toUnsignedInt((byte) -1); assertThat(result).isEqualTo(255); }
@Test public void byteToUnsignedInt_0x01() { final int result = ByteUtil.toUnsignedInt((byte) 1); assertThat(result).isEqualTo(1); }