/**
* Test SerializedExceptionPBImpl.
*/
@Test
public void testSerializedExceptionPBImpl() {
SerializedExceptionPBImpl original = new SerializedExceptionPBImpl();
original.init("testMessage");
SerializedExceptionPBImpl copy = new SerializedExceptionPBImpl(
original.getProto());
assertEquals("testMessage", copy.getMessage());
original = new SerializedExceptionPBImpl();
original.init("testMessage", new Throwable(new Throwable("parent")));
copy = new SerializedExceptionPBImpl(original.getProto());
assertEquals("testMessage", copy.getMessage());
assertEquals("parent", copy.getCause().getMessage());
assertTrue( copy.getRemoteTrace().startsWith(
"java.lang.Throwable: java.lang.Throwable: parent"));
}