### Question:
IPUtils { public static final int ubyte2int(byte in) { return (in < 0) ? (int) in + 256 : (int) 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 testubyte2int() { assertEquals(IPUtils.ubyte2int((byte) -1), 255); assertEquals(IPUtils.ubyte2int((byte) 0), 0); assertEquals(IPUtils.ubyte2int((byte) 127), 127); assertEquals(IPUtils.ubyte2int((byte) -127), 129); assertEquals(IPUtils.ubyte2int((byte) -128), 128); assertEquals(IPUtils.ubyte2int((byte) -126), 130); }