return createServerSession();
}
};
try {
service.processMessage(new QueryMessage(null) {
@Override
public Query getQuery() {
// serializable exception thrown
throw new CayenneRuntimeException();
}
});
fail("Expected to throw");
}
catch (Exception ex) {
Util.cloneViaSerialization(ex);
}
try {
service.processMessage(new QueryMessage(null) {
@Override
public Query getQuery() {
// non-serializable exception thrown
throw new MockUnserializableException();