TypedBytesWritable extends BytesWritable { public String toString() { return getValue().toString(); } TypedBytesWritable();  TypedBytesWritable(byte[] bytes); void setValue(Object obj); Object getValue(); Type getType(); String toString();  }
@Test public void testToString() { TypedBytesWritable tbw = new TypedBytesWritable(); tbw.setValue(true); assertEquals("true", tbw.toString()); tbw.setValue(12345); assertEquals("12345", tbw.toString()); tbw.setValue(123456789L); assertEquals("123456789", tbw.toString()); tbw.setValue((float) 1.23); assertEquals("1.23", tbw.toString()); tbw.setValue(1.23456789); assertEquals("1.23456789", tbw.toString()); tbw.setValue("random text"); assertEquals("random text", tbw.toString()); }