@Test
public void canPropagateExceptionToClientCode() {

    CommitRollbackMethodCall commitRollbackMethodCall = new CommitRollbackMethodCall( false );
    commitRollbackMethodCall.setTransactionId( System.currentTimeMillis() );
    Message message = new Message();
    message.setSrc( address );
    message.setBuffer( objectBuffer.writeClassAndObject( commitRollbackMethodCall ) );
    try {
        receiveAdapter.receive( message );
    }
    catch ( RuntimeException e ) {}
    String exceptionAsString = response.getExceptionAsString();
    assertThat( exceptionAsString, is( notNullValue() ) );
    commitRollbackMethodCall = new CommitRollbackMethodCall( true );
    commitRollbackMethodCall.setTransactionId( System.currentTimeMillis() );
    message.setBuffer( objectBuffer.writeClassAndObject( commitRollbackMethodCall ) );
    try {
        receiveAdapter.receive( message );
    }
    catch ( RuntimeException e ) {}
    exceptionAsString = response.getExceptionAsString();
    assertThat( exceptionAsString, is( notNullValue() ) );
}