### Question:
Value implements WritableComparable<Object> { public void set(final byte[] b) { requireNonNull(b); this.value = b; } Value();  Value(CharSequence cs);  Value(Text text);  Value(byte[] bytes);  Value(ByteBuffer bytes);  Value(byte[] bytes, boolean copy);  Value(final Value ibw);  Value(final byte[] newData, final int offset, final int length); byte[] get(); void set(final byte[] b); void copy(byte[] b); int getSize(); @Override void readFields(final DataInput in); @Override void write(final DataOutput out); @Override int hashCode(); @Override int compareTo(Object right_obj); int compareTo(final byte[] that); @Override boolean equals(Object right_obj); boolean contentEquals(byte[] right_obj); @Override String toString();  }### Answer:
@Test(expected = NullPointerException.class) public void testNullSet() { Value v = new Value(); v.set(null); }
@Test public void testSet() { Value v = new Value(); v.set(DATA); assertArrayEquals(DATA, v.get()); assertSame(DATA, v.get()); }