### Question:
TransmitException extends CommunicationException { public String getTransmitStatusMessage() { if (transmitStatus != null) return transmitStatus.getDescription(); return null; } TransmitException(XBeeTransmitStatus transmitStatus);  TransmitException(String message, XBeeTransmitStatus transmitStatus);  TransmitException(String message, Throwable cause, XBeeTransmitStatus transmitStatus); XBeeTransmitStatus getTransmitStatus(); String getTransmitStatusMessage(); @Override String getMessage();  }### Answer:
@Test public final void testGetTransmitStatusMessage() { XBeeTransmitStatus transmitStatus = XBeeTransmitStatus.INVALID_ENDPOINT; TransmitException e = new TransmitException(transmitStatus); String result = e.getTransmitStatusMessage(); assertThat("Created 'TransmitException' does not return the expected transmit status message", result, is(equalTo(transmitStatus.getDescription()))); }
@Test public final void testGetTransmitStatusMessageNull() { XBeeTransmitStatus transmitStatus = null; TransmitException e = new TransmitException(transmitStatus); String result = e.getTransmitStatusMessage(); assertThat("Created 'TransmitException' does not return the expected transmit status message", result, is(nullValue(String.class))); }