### Question:
MessagePanel extends JTextPane implements IMessageHandler { public void showWarningMessage(String msg) { if (msg == null) { throw new IllegalArgumentException("msg cannot be null"); } privateShowMessage(msg, _saSetWarning); } MessagePanel(); void addToMessagePanelPopup(Action action); synchronized void showMessage(final Throwable th, 
                                        final ExceptionFormatter formatter); synchronized void showErrorMessage(final Throwable th, 
                                              ExceptionFormatter formatter); synchronized void showMessage(final String msg); void showWarningMessage(String msg); synchronized void showErrorMessage(final String msg);  }### Answer:
@Test (expected = IllegalArgumentException.class) public final void testShowWarningMessage() { messagePanelUnderTest.showWarningMessage(null); }