### Question:
XBeeIMEIAddress { public String getValue() { return HexUtils.byteArrayToHexString(address).substring(1); } XBeeIMEIAddress(byte[] address);  XBeeIMEIAddress(String address); String getValue(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testCreateWithValidByteArray() { XBeeIMEIAddress imei = null; try { imei = new XBeeIMEIAddress(VALID_BYTE_ARRAY); } catch (Exception e) { fail("This exception should have not been thrown."); } assertEquals(EXPECTED_STRING, imei.getValue()); }
@Test public void testCreateWithValidString() { XBeeIMEIAddress imei = null; try { imei = new XBeeIMEIAddress(VALID_STRING); } catch (Exception e) { fail("This exception should have not been thrown."); } assertEquals(EXPECTED_STRING, imei.getValue()); }
@Test public void testCreateWithIncompleteByteArray() { XBeeIMEIAddress imei = null; try { imei = new XBeeIMEIAddress(INCOMPLETE_BYTE_ARRAY); } catch (Exception e) { fail("This exception should have not been thrown."); } assertEquals(EXPECTED_INCOMPLETE_STRING, imei.getValue()); }
@Test public void testCreateWithIncompleteString() { XBeeIMEIAddress imei = null; try { imei = new XBeeIMEIAddress(INCOMPLETE_STRING); } catch (Exception e) { fail("This exception should have not been thrown."); } assertEquals(EXPECTED_INCOMPLETE_STRING, imei.getValue()); }