// Get the bytes of the serialized object
byte[] bytes = bos.toByteArray( );
// Deserialize from a byte array
ObjectInput in = new ObjectInputStream( new ByteArrayInputStream( bytes ) );
in.readObject( );
in.close( );
// JSR-94 Tests
// Reset the session. [ruleSession.reset();]
WorkingMemory newWorkingMemory = ruleBase.newWorkingMemory( );