@@ -0,0 +1,2190 @@
+/**%0A * Licensed to the Apache Software Foundation (ASF) under one or more%0A * contributor license agreements.  See the NOTICE file distributed with%0A * this work for additional information regarding copyright ownership.%0A * The ASF licenses this file to You under the Apache License, Version 2.0%0A * (the %22License%22); you may not use this file except in compliance with%0A * the License.  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.apache.activemq.usecases;%0A%0Aimport java.io.Serializable;%0Aimport java.io.ObjectInputStream;%0Aimport java.io.ObjectOutputStream;%0Aimport java.io.IOException;%0Aimport java.io.ObjectStreamException;%0A%0Apublic class MyObject implements Serializable %7B%0A%0A    private String message;%0A    private boolean writeObjectCalled, readObjectCalled, readObjectNoDataCalled;%0A%0A    public MyObject(String message) %7B%0A        this.setMessage(message);%0A    %7D%0A%0A    public void setMessage(String message) %7B%0A        this.message = message;%0A    %7D%0A%0A    public String getMessage() %7B%0A        return message;%0A    %7D%0A%0A    private void writeObject(java.io.ObjectOutputStream out) throws IOException %7B%0A        writeObjectCalled = true;%0A        Thread.dumpStack();%0A        out.defaultWriteObject();%0A    %7D%0A%0A    private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException %7B%0A        readObjectCalled = true;%0A        Thread.dumpStack();%0A        in.defaultReadObject();%0A    %7D%0A%0A    private void readObjectNoData() throws ObjectStreamException %7B%0A        Thread.dumpStack();%0A        readObjectNoDataCalled = true;%0A    %7D%0A%0A    public boolean getWriteObjectCalled() %7B%0A        return writeObjectCalled;%0A    %7D%0A%0A    public boolean getReadObjectCalled() %7B%0A        return readObjectCalled;%0A    %7D%0A%0A    public boolean getReadObjectNoDataCalled() %7B%0A        return readObjectNoDataCalled;%0A    %7D%0A%7D%0A%0A%0A

add additional test class : https://issues.apache.org/activemq/browse/AMQ-2622