### Question:
TLVList implements Serializable, Loggeable { public TLVMsg find(int tag) { tagToFind = tag; for (TLVMsg tlv : tags) { if (tlv.getTag() == tag) { indexLastOccurrence = tags.indexOf(tlv); return tlv; } } indexLastOccurrence = -1; return null; } TLVList(); void unpack(byte[] buf); List<TLVMsg> getTags(); Enumeration<TLVMsg> elements(); void unpack(byte[] buf, int offset); void append(TLVMsg tlv); TLVList append(int tag, byte[] value); TLVList append(int tag, String value); void deleteByIndex(int index); void deleteByTag(int tag); TLVMsg find(int tag); int findIndex(int tag); TLVMsg findNextTLV(); TLVMsg index(int index); byte[] pack(); String getString(int tag); byte[] getValue(int tag); boolean hasTag(int tag); @Override void dump(PrintStream p, String indent);  }### Answer:
@Test public void testFind() { instance.append(TEST_TAG1, new byte[1]); TLVMsg expected = instance.createTLVMsg(0x07, null); instance.append(expected); TLVMsg result = instance.find(0x07); assertSame(expected, result); }
@Test public void testFind3() { TLVMsg result = instance.find(TEST_TAG1); assertNull(result); }