mil.dod.th.ose.shared/test/mil/dod/th/ose/shared/TestProgramWrappedExceptionExtractor.java
@Test
    public void testGetRootMessageThreeExceptions()
    {
        PrivilegedActionException e = new PrivilegedActionException(
                new Exception("I am an exception message tooooo", 
                        new CommandExecutionException("Unsupported!")));
        
        final String message = WrappedExceptionExtractor.getRootCauseMessage(e);
        
        assertThat(message, is("Unsupported!"));
        assertThat(message, is(not("I am an exception message toooo")));
    }
/**
     * Test extracting the original message of a three layer exception.
     * Verify expected message is returned.
     */
Test extracting the original message of a three layer exception.
Verify expected message is returned.
Test extracting the original message of a three layer exception . Verify expected message is returned .
@Test
    public void testGetRootMessageThreeExceptions()
    {
        PrivilegedActionException e = new PrivilegedActionException(
                new Exception("I am an exception message tooooo", 
                        new CommandExecutionException("Unsupported!")));
        final String message = WrappedExceptionExtractor.getRootCauseMessage(e);
        assertThat(message, is("Unsupported!"));
        assertThat(message, is(not("I am an exception message toooo")));
    }
@ Test public void testGetRootMessageThreeExceptions ( ) { PrivilegedActionException e = new PrivilegedActionException ( new Exception ( "I am an exception message tooooo" , new CommandExecutionException ( "Unsupported!" ) ) ) ; final String message = WrappedExceptionExtractor . getRootCauseMessage ( e ) ; assertThat ( message , is ( "Unsupported!" ) ) ; assertThat ( message , is ( not ( "I am an exception message toooo" ) ) ) ; }
Test extracting the original message of a three layer exception.
Test extracting the original message of a three layer exception .