### Question:
BytesWritable extends BinaryComparable implements WritableComparable<BinaryComparable> { @Override public String toString() { StringBuilder sb = new StringBuilder(3*size); for (int idx = 0; idx < size; idx++) { if (idx != 0) { sb.append(' '); } String num = Integer.toHexString(0xff & bytes[idx]); if (num.length() < 2) { sb.append('0'); } sb.append(num); } return sb.toString(); } BytesWritable();  BytesWritable(byte[] bytes);  BytesWritable(byte[] bytes, int length); byte[] copyBytes(); byte[] getBytes(); @Deprecated byte[] get(); int getLength(); @Deprecated int getSize(); void setSize(int size); int getCapacity(); void setCapacity(int new_cap); void set(BytesWritable newData); void set(byte[] newData, int offset, int length); void readFields(DataInput in); void write(DataOutput out); @Override int hashCode(); @Override boolean equals(Object right_obj); @Override String toString();  }### Answer:
@Test public void testToString() { checkToString(new byte[]{0,1,2,0x10}, "00 01 02 10"); checkToString(new byte[]{-0x80, -0x7f, -0x1, -0x2, 1, 0}, "80 81 ff fe 01 00"); }