//#if defined(FOUNDATION10) || defined(J2SE13)
//## com.ibm.icu.impl.ByteBuffer buffer = com.ibm.icu.impl.ByteBuffer.wrap(ba);
//#else
java.nio.ByteBuffer buffer = java.nio.ByteBuffer.wrap(ba);
//#endif
ByteArrayWrapper x = new ByteArrayWrapper(buffer);
ByteArrayWrapper y = new ByteArrayWrapper(ba, 3);
ByteArrayWrapper z = new ByteArrayWrapper(bb, 3);
if (!y.toString().equals("00 01 02")){
errln("FAIL: test toString : Failed!");
}
// test equality
if (!x.equals(y) || !x.equals(z))
errln("FAIL: test (operator ==): Failed!");
if (x.hashCode()!=y.hashCode())
errln("FAIL: identical objects have different hash codes.");
// test non-equality
y = new ByteArrayWrapper(bb, 4);
if (x.equals(y))
errln("FAIL: test (operator !=): Failed!");
// test sign of unequal comparison
if ((x.compareTo(y) > 0) != (y.compareTo(x) < 0)) {