### Question:
DefaultProblem implements Problem { public String getMessage() { String msg; if ( message != null && message.length() > 0 ) { msg = message; } else { msg = exception.getMessage(); if ( msg == null ) { msg = ""; } } return msg; } DefaultProblem( String message, Severity severity, String source, int lineNumber, int columnNumber,
                                   Exception exception ); String getSource(); int getLineNumber(); int getColumnNumber(); String getLocation(); Exception getException(); String getMessage(); Severity getSeverity(); @Override String toString();  }### Answer:
@Test public void testGetMessage() { DefaultProblem problem = new DefaultProblem( "MESSAGE", null, null, -1, -1, null ); assertEquals( "MESSAGE", problem.getMessage() ); problem = new DefaultProblem( null, null, null, -1, -1, new Exception() ); assertEquals( "", problem.getMessage() ); problem = new DefaultProblem( null, null, null, -1, -1, new Exception( "EXCEPTION MESSAGE" ) ); assertEquals( "EXCEPTION MESSAGE", problem.getMessage() ); }