Example usage for org.apache.commons.lang SerializationException getCause

List of usage examples for org.apache.commons.lang SerializationException getCause

Introduction

In this page you can find the example usage for org.apache.commons.lang SerializationException getCause.

Prototype

public Throwable getCause() 

Source Link

Usage

From source file:org.marketcetera.util.log.I18NMessageProviderTest.java

@Test
public void deserialization() {
    byte[] serialized = SerializationUtils.serialize(new I18NMessageProvider("nonexistent_prv"));
    try {/*from w  w  w  .j a v a  2 s .c  o m*/
        SerializationUtils.deserialize(serialized);
        fail();
    } catch (SerializationException ex) {
        assertEquals(IOException.class, ex.getCause().getClass());
    }
}