### Question:
LookUpKey { public void add(Writable writable) throws IOException { if (writable == null) { throw new IllegalArgumentException("writable must not be null"); } writable.write(buffer); } LookUpKey();  LookUpKey(int bufferSize); void reset(); void add(Writable writable); LookUpKey copy(); LookUpKey.View getDirectView(); LookUpKey.View getFrozenView(); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void add() throws Exception { LookUpKey k1 = new LookUpKey(); LookUpKey k2 = new LookUpKey(1000); LookUpKey k3 = new LookUpKey(); k1.add(new IntOption(100)); k2.add(new IntOption(100)); k3.add(new IntOption(100)); k1.add(new IntOption(101)); k2.add(new IntOption(101)); k3.add(new IntOption(101)); k1.add(new IntOption(102)); k2.add(new IntOption(102)); assertThat(k1.equals(k2), is(true)); assertThat(k1.equals(k3), is(false)); assertThat(k1.hashCode(), is(k2.hashCode())); }