### Question:
ATCommandException extends CommunicationException { public String getCommandStatusMessage() { if (atCommandStatus != null) return atCommandStatus.getDescription(); return null; } ATCommandException(ATCommandStatus atCommandStatus);  ATCommandException(String message, ATCommandStatus atCommandStatus);  ATCommandException(String message, Throwable cause, ATCommandStatus atCommandStatus); ATCommandStatus getCommandStatus(); String getCommandStatusMessage(); @Override String getMessage();  }### Answer:
@Test public final void testGetCommandStatusMessage() { ATCommandStatus atCommandStatus = ATCommandStatus.INVALID_PARAMETER; ATCommandException e = new ATCommandException(atCommandStatus); String result = e.getCommandStatusMessage(); assertThat("Created 'ATCommandException' does not return the expected AT command status message", result, is(equalTo(atCommandStatus.getDescription()))); }
@Test public final void testGetCommandStatusMessageNull() { ATCommandStatus atCommandStatus = null; ATCommandException e = new ATCommandException(atCommandStatus); String result = e.getCommandStatusMessage(); assertThat("Created 'ATCommandException' does not return the expected AT command status message", result, is(nullValue(String.class))); }