### Question:
LLDPOrganizationalTLV extends LLDPTLV { public LLDPOrganizationalTLV setOUI(byte[] oui) { if (oui.length != OUI_LENGTH) { throw new IllegalArgumentException("The length of OUI must be " + OUI_LENGTH + ", but it is " + oui.length); } this.oui = Arrays.copyOf(oui, oui.length); return this; } LLDPOrganizationalTLV(); LLDPOrganizationalTLV setOUI(byte[] oui); byte[] getOUI(); LLDPOrganizationalTLV setSubType(byte subType); byte getSubType(); LLDPOrganizationalTLV setInfoString(byte[] infoString); LLDPOrganizationalTLV setInfoString(String infoString); byte[] getInfoString(); @Override byte[] serialize(); @Override LLDPTLV deserialize(ByteBuffer bb); @Override int hashCode(); @Override boolean equals(Object obj); static final int OUI_LENGTH; static final int SUBTYPE_LENGTH; static final byte ORGANIZATIONAL_TLV_TYPE; static final int MAX_INFOSTRING_LENGTH; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testShortOUI() { LLDPOrganizationalTLV tlv = new LLDPOrganizationalTLV(); tlv.setOUI(new byte[2]); }
@Test(expected = IllegalArgumentException.class) public void testLongOUI() { LLDPOrganizationalTLV tlv = new LLDPOrganizationalTLV(); tlv.setOUI(new byte[4]); }