### Question:
IPUtils { public static final byte int2ubyte(int in) { in = ((in < 0) ? in = 0 - in : in) % 256; return (in > 127) ? (byte) (in - 256) : (byte) in; }  static Integer rndInt(int lo, int hi); static Double rndDouble(double lo, double hi); static Integer rndPosInt(int lo, int hi); static String rndIp(); static Object rndChoice(List oList); static Object rndChoice(Object[] oArray); static String rndperc(); static final int ubyte2int(byte in); static final byte int2ubyte(int in); static boolean isValidIpv6String(String in); static final boolean isValidIpv4Subnet(String in); static boolean isValidIpv6Subnet(String in); static boolean isValidIpv4String(String in); static int nibble2int(byte nibble); static final byte int2nibble(int in); static String int16bit2hex(int i16); static int hex16bit2int(String in); static boolean IP4RegEx(String ip); static boolean IP6RegEx(String ip); static boolean IPRegEx(String ip);  }### Answer:
@Test public void testint2ubyte() { assertEquals(IPUtils.int2ubyte(255), (byte) -1); assertEquals(IPUtils.int2ubyte(0), (byte) 0); assertEquals(IPUtils.int2ubyte(127), (byte) 127); assertEquals(IPUtils.int2ubyte(129), (byte) -127); assertEquals(IPUtils.int2ubyte(128), (byte) -128); assertEquals(IPUtils.int2ubyte(130), (byte) -126); }