@Test public void toByteExactUnsigned_minNegativeValue() { final int value = -128; assertThatThrownBy(() -> ByteUtil.toByteExactUnsigned(value)) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("Supplied int value (-128) is negative"); }
public static byte toByteExactUnsigned(final int value) throws IllegalArgumentException { checkArgument(value >= 0, "Supplied int value (%s) is negative", value); return castToByteExact(value); }
ByteUtil { public static byte toByteExactUnsigned(final int value) throws IllegalArgumentException { checkArgument(value >= 0, "Supplied int value (%s) is negative", value); return castToByteExact(value); } }
ByteUtil { public static byte toByteExactUnsigned(final int value) throws IllegalArgumentException { checkArgument(value >= 0, "Supplied int value (%s) is negative", value); return castToByteExact(value); }  }
ByteUtil { public static byte toByteExactUnsigned(final int value) throws IllegalArgumentException { checkArgument(value >= 0, "Supplied int value (%s) is negative", value); return castToByteExact(value); }  static int toUnsignedInt(final byte value); static byte toByteExact(final int value); static byte toByteExactUnsigned(final int value); }
ByteUtil { public static byte toByteExactUnsigned(final int value) throws IllegalArgumentException { checkArgument(value >= 0, "Supplied int value (%s) is negative", value); return castToByteExact(value); }  static int toUnsignedInt(final byte value); static byte toByteExact(final int value); static byte toByteExactUnsigned(final int value);  }