@@ -0,0 +1,1825 @@
+/**%0A * Copyright 2010 55 Minutes (http://www.55minutes.com)%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * 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 fiftyfive.wicket.test;%0A%0Aimport org.apache.wicket.model.IModel;%0A%0A/**%0A * Holds a value that will not be serialized. This is helpful%0A * in unit tests where you need to construct a quick and dirty model for a%0A * non-serializable object, and therefore %7B@code Model.of()%7D will not work.%0A * This class is not intended for production code.%0A */%0Apublic class TransientModel%3CT%3E implements IModel%3CT%3E%0A%7B%0A    private transient T _object;%0A    %0A    /**%0A     * Convience method for constructing a TransientModel instance.%0A     * These statements are equivalent:%0A     * %3Cpre class=%22example%22%3E%0A     * IModel&lt;String&gt; = TransientModel.of(value);%0A     * IModel&lt;String&gt; = new TransientModel&lt;String&gt;(value);%3C/pre%3E%0A     */%0A    public static %3CT%3E TransientModel%3CT%3E of(T value)%0A    %7B%0A        return new TransientModel%3CT%3E(value);%0A    %7D%0A    %0A    /**%0A     * Constructs a model that will hold the given value.%0A     */%0A    public TransientModel(T value)%0A    %7B%0A        super();%0A        setObject(value);%0A    %7D%0A    %0A    public T getObject()%0A    %7B%0A        return _object;%0A    %7D%0A    %0A    public void setObject(T value)%0A    %7B%0A        _object = value;%0A    %7D%0A    %0A    public void detach()%0A    %7B%0A        // pass%0A    %7D%0A%7D%0A

Add a `TransientModel` class that might come in handy when writing unit tests.