### Question:
CsvTransformGeneratorException extends Exception implements Serializable { @Override public String getLocalizedMessage() { if ( localizedMessage != null ) { return localizedMessage; } return super.getLocalizedMessage(); } CsvTransformGeneratorException();  CsvTransformGeneratorException( String message );  CsvTransformGeneratorException( Throwable cause );  CsvTransformGeneratorException( String message, Throwable cause );  CsvTransformGeneratorException( String message, Throwable cause, String causeStackTrace );  CsvTransformGeneratorException( String message, Throwable cause, String causeMessage,
                                         String causeStackTrace );  CsvTransformGeneratorException( String message, Throwable cause, String causeMessage,
      String causeStackTrace, String localizedMessage ); String getCauseMessage(); void setCauseMessage( String causeMessage ); String getCauseStackTrace(); void setCauseStackTrace( String causeStackTrace ); @Override String getLocalizedMessage();  }### Answer:
@Test public void test() { final Exception causeException = new Exception( "cause msg" ); Assert.assertEquals( null, ( new CsvTransformGeneratorException() ).getLocalizedMessage() ); Assert.assertEquals( "msg", ( new CsvTransformGeneratorException( "msg" ) ).getLocalizedMessage() ); Assert.assertEquals( causeException.toString(), ( new CsvTransformGeneratorException( causeException ) ).getLocalizedMessage() ); Assert.assertEquals( "msg", ( new CsvTransformGeneratorException( "msg", null ) ).getLocalizedMessage() ); Assert.assertEquals( "msg", ( new CsvTransformGeneratorException( "msg", causeException ) ).getLocalizedMessage() ); Assert.assertEquals( "msg", ( new CsvTransformGeneratorException( "msg", causeException, "explicit cause message" ) ).getLocalizedMessage() ); Assert.assertEquals( "msg", ( new CsvTransformGeneratorException( "msg", causeException, "explicit cause message", "cause stack trace" ) ).getLocalizedMessage() ); Assert.assertEquals( "localized", ( new CsvTransformGeneratorException( "a message", null, null, null, "localized" ) ).getLocalizedMessage() ); Assert.assertEquals( "localized", ( new CsvTransformGeneratorException( "a message", new Exception(), "a", "b", "localized" ) ).getLocalizedMessage() ); }