147d431f63a66505a645f282416659a9758a91f1cBrett Chabot/*
247d431f63a66505a645f282416659a9758a91f1cBrett Chabot * Copyright 2001-2009 OFFIS, Tammo Freese
347d431f63a66505a645f282416659a9758a91f1cBrett Chabot *
447d431f63a66505a645f282416659a9758a91f1cBrett Chabot * Licensed under the Apache License, Version 2.0 (the "License");
547d431f63a66505a645f282416659a9758a91f1cBrett Chabot * you may not use this file except in compliance with the License.
647d431f63a66505a645f282416659a9758a91f1cBrett Chabot * You may obtain a copy of the License at
747d431f63a66505a645f282416659a9758a91f1cBrett Chabot *
847d431f63a66505a645f282416659a9758a91f1cBrett Chabot *     http://www.apache.org/licenses/LICENSE-2.0
947d431f63a66505a645f282416659a9758a91f1cBrett Chabot *
1047d431f63a66505a645f282416659a9758a91f1cBrett Chabot * Unless required by applicable law or agreed to in writing, software
1147d431f63a66505a645f282416659a9758a91f1cBrett Chabot * distributed under the License is distributed on an "AS IS" BASIS,
1247d431f63a66505a645f282416659a9758a91f1cBrett Chabot * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1347d431f63a66505a645f282416659a9758a91f1cBrett Chabot * See the License for the specific language governing permissions and
1447d431f63a66505a645f282416659a9758a91f1cBrett Chabot * limitations under the License.
1547d431f63a66505a645f282416659a9758a91f1cBrett Chabot */
1647d431f63a66505a645f282416659a9758a91f1cBrett Chabotpackage org.easymock;
1747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
1847d431f63a66505a645f282416659a9758a91f1cBrett Chabotimport java.lang.reflect.Proxy;
1947d431f63a66505a645f282416659a9758a91f1cBrett Chabotimport java.util.Comparator;
2047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
2147d431f63a66505a645f282416659a9758a91f1cBrett Chabotimport org.easymock.internal.*;
2247d431f63a66505a645f282416659a9758a91f1cBrett Chabotimport org.easymock.internal.matchers.*;
2347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
2447d431f63a66505a645f282416659a9758a91f1cBrett Chabotpublic class EasyMock {
2547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
2647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
2747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Since EasyMock 2.4, by default, a mock wasn't allowed to be called in
2847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * multiple threads unless it was made thread-safe (See
2947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * {@link #makeThreadSafe(Object, boolean)} method). Since EasyMock 2.5,
3047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * this isn't the default anymore. For backward compatibility, this property
3147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * can bring EasyMock 2.4 behavior back.
3247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
3347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static final String ENABLE_THREAD_SAFETY_CHECK_BY_DEFAULT = "easymock.enableThreadSafetyCheckByDefault";
3447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
3547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
3647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Since EasyMock 2.5, by default a mock is thread-safe. For backward
3747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * compatibility, this property can change the default. A given mock still
3847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * can be made thread-safe by calling
3947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * {@link #makeThreadSafe(Object, boolean)}.
4047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
4147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static final String NOT_THREAD_SAFE_BY_DEFAULT = "easymock.notThreadSafeByDefault";
4247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
4347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
4447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a mock object that implements the given interface, order checking
4547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is enabled by default.
4647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
4747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
4847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the interface that the mock object should implement.
4947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param toMock
5047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the class of the interface that the mock object should
5147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            implement.
5247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the mock object.
5347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
5447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T createStrictMock(Class<T> toMock) {
5547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return createStrictControl().createMock(toMock);
5647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
5747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
5847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
5947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a mock object that implements the given interface, order checking
6047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is enabled by default.
6147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param name the name of the mock object.
6247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param toMock
6347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the class of the interface that the mock object should
6447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            implement.
6547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
6647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the interface that the mock object should implement.
6747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the mock object.
6847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @throws IllegalArgumentException if the name is not a valid Java identifier.
6947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
7047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T createStrictMock(String name, Class<T> toMock) {
7147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return createStrictControl().createMock(name, toMock);
7247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
7347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
7447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
7547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a mock object that implements the given interface, order checking
7647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is disabled by default.
7747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
7847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
7947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the interface that the mock object should implement.
8047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param toMock
8147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the class of the interface that the mock object should
8247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            implement.
8347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the mock object.
8447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
8547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T createMock(Class<T> toMock) {
8647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return createControl().createMock(toMock);
8747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
8847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
8947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
9047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a mock object that implements the given interface, order checking
9147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is disabled by default.
9247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param name the name of the mock object.
9347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param toMock
9447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the class of the interface that the mock object should
9547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            implement.
9647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
9747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
9847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the interface that the mock object should implement.
9947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the mock object.
10047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @throws IllegalArgumentException if the name is not a valid Java identifier.
10147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
10247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T createMock(String name, Class<T> toMock) {
10347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return createControl().createMock(name, toMock);
10447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
10547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
10647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
10747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a mock object that implements the given interface, order checking
10847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is disabled by default, and the mock object will return <code>0</code>,
10947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <code>null</code> or <code>false</code> for unexpected invocations.
11047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
11147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
11247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the interface that the mock object should implement.
11347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param toMock
11447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the class of the interface that the mock object should
11547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            implement.
11647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the mock object.
11747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
11847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T createNiceMock(Class<T> toMock) {
11947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return createNiceControl().createMock(toMock);
12047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
12147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
12247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
12347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a mock object that implements the given interface, order checking
12447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is disabled by default, and the mock object will return <code>0</code>,
12547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <code>null</code> or <code>false</code> for unexpected invocations.
12647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param name the name of the mock object.
12747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param toMock
12847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the class of the interface that the mock object should
12947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            implement.
13047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
13147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
13247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the interface that the mock object should implement.
13347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the mock object.
13447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @throws IllegalArgumentException if the name is not a valid Java identifier.
13547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
13647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T createNiceMock(String name, Class<T> toMock) {
13747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return createNiceControl().createMock(name, toMock);
13847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
13947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
14047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
14147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a control, order checking is enabled by default.
14247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
14347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the control.
14447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
14547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static IMocksControl createStrictControl() {
14647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return new MocksControl(MocksControl.MockType.STRICT);
14747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
14847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
14947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
15047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a control, order checking is disabled by default.
15147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
15247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the control.
15347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
15447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static IMocksControl createControl() {
15547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return new MocksControl(MocksControl.MockType.DEFAULT);
15647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
15747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
15847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
15947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Creates a control, order checking is disabled by default, and the mock
16047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * objects created by this control will return <code>0</code>,
16147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <code>null</code> or <code>false</code> for unexpected invocations.
16247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
16347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the control.
16447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
16547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static IMocksControl createNiceControl() {
16647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return new MocksControl(MocksControl.MockType.NICE);
16747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
16847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
16947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
17047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Returns the expectation setter for the last expected invocation in the
17147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * current thread.
17247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
17347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type returned by the expected method
17447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
17547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the parameter is used to transport the type to the
17647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            ExpectationSetter. It allows writing the expected call as
17747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            argument, i.e.
17847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            <code>expect(mock.getName()).andReturn("John Doe")<code>.
17947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
18047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the expectation setter.
18147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
18247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> IExpectationSetters<T> expect(T value) {
18347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return EasyMock.getControlForLastCall();
18447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
18547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
18647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
18747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Returns the expectation setter for the last expected invocation in the
18847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * current thread. This method is used for expected invocations on void
18947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * methods.
19047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
19147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type returned by the expected method
19247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the expectation setter.
19347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
19447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> IExpectationSetters<T> expectLastCall() {
19547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return getControlForLastCall();
19647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
19747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
19847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    @SuppressWarnings("unchecked")
19947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    private static <T> IExpectationSetters<T> getControlForLastCall() {
20047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        MocksControl lastControl = LastControl.lastControl();
20147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        if (lastControl == null) {
20247d431f63a66505a645f282416659a9758a91f1cBrett Chabot            throw new IllegalStateException("no last call on a mock available");
20347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
20447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return (IExpectationSetters<T>) lastControl;
20547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
20647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
20747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
20847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any boolean argument. For details, see the EasyMock
20947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * documentation.
21047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
21147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>false</code>.
21247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
21347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static boolean anyBoolean() {
21447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
21547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return false;
21647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
21747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
21847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
21947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any byte argument. For details, see the EasyMock documentation.
22047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
22147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
22247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
22347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte anyByte() {
22447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
22547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
22647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
22747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
22847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
22947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any char argument. For details, see the EasyMock documentation.
23047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
23147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
23247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
23347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static char anyChar() {
23447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
23547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
23647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
23747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
23847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
23947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any int argument. For details, see the EasyMock documentation.
24047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
24147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
24247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
24347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int anyInt() {
24447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
24547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
24647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
24747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
24847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
24947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any long argument. For details, see the EasyMock documentation.
25047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
25147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
25247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
25347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long anyLong() {
25447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
25547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
25647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
25747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
25847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
25947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any float argument. For details, see the EasyMock documentation.
26047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
26147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
26247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
26347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float anyFloat() {
26447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
26547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
26647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
26747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
26847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
26947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any double argument. For details, see the EasyMock documentation.
27047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
27147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
27247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
27347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double anyDouble() {
27447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
27547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
27647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
27747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
27847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
27947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any short argument. For details, see the EasyMock documentation.
28047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
28147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
28247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
28347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short anyShort() {
28447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
28547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
28647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
28747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
28847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
28947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects any Object argument. For details, see the EasyMock documentation.
29047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
29147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
29247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
29347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
29447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T anyObject() {
29547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Any.ANY);
29647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
29747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
29847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
29947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
30047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a comparable argument greater than or equal the given value. For details, see
30147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
30247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
30347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
30447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
30547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
30647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
30747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
30847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T extends Comparable<T>> T geq(Comparable<T> value) {
30947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterOrEqual<T>(value));
31047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
31147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
31247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
31347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
31447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte argument greater than or equal to the given value. For
31547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
31647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
31747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
31847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
31947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
32047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
32147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte geq(byte value) {
32247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterOrEqual<Byte>(value));
32347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
32447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
32547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
32647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
32747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double argument greater than or equal to the given value. For
32847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
32947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
33047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
33147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
33247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
33347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
33447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double geq(double value) {
33547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterOrEqual<Double>(value));
33647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
33747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
33847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
33947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
34047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float argument greater than or equal to the given value. For
34147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
34247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
34347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
34447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
34547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
34647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
34747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float geq(float value) {
34847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterOrEqual<Float>(value));
34947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
35047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
35147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
35247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
35347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int argument greater than or equal to the given value. For
35447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
35547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
35647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
35747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
35847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
35947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
36047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int geq(int value) {
36147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterOrEqual<Integer>(value));
36247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
36347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
36447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
36547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
36647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long argument greater than or equal to the given value. For
36747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
36847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
36947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
37047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
37147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
37247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
37347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long geq(long value) {
37447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterOrEqual<Long>(value));
37547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
37647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
37747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
37847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
37947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short argument greater than or equal to the given value. For
38047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
38147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
38247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
38347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
38447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
38547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
38647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short geq(short value) {
38747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterOrEqual<Short>(value));
38847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
38947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
39047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
39147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
39247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a comparable argument less than or equal the given value. For details, see
39347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
39447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
39547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
39647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
39747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
39847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
39947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
40047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T extends Comparable<T>> T leq(Comparable<T> value) {
40147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessOrEqual<T>(value));
40247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
40347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
40447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
40547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
40647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte argument less than or equal to the given value. For
40747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
40847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
40947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
41047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
41147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
41247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
41347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte leq(byte value) {
41447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessOrEqual<Byte>(value));
41547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
41647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
41747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
41847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
41947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double argument less than or equal to the given value. For
42047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
42147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
42247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
42347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
42447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
42547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
42647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double leq(double value) {
42747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessOrEqual<Double>(value));
42847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
42947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
43047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
43147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
43247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float argument less than or equal to the given value. For
43347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
43447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
43547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
43647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
43747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
43847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
43947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float leq(float value) {
44047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessOrEqual<Float>(value));
44147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
44247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
44347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
44447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
44547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int argument less than or equal to the given value. For
44647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
44747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
44847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
44947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
45047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
45147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
45247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int leq(int value) {
45347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessOrEqual<Integer>(value));
45447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
45547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
45647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
45747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
45847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long argument less than or equal to the given value. For
45947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
46047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
46147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
46247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
46347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
46447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
46547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long leq(long value) {
46647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessOrEqual<Long>(value));
46747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
46847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
46947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
47047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
47147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short argument less than or equal to the given value. For
47247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * details, see the EasyMock documentation.
47347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
47447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
47547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
47647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
47747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
47847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short leq(short value) {
47947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessOrEqual<Short>(value));
48047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
48147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
48247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
48347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
48447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a comparable argument greater than the given value. For details, see
48547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
48647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
48747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
48847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
48947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
49047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
49147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
49247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T extends Comparable<T>> T gt(Comparable<T> value) {
49347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterThan<T>(value));
49447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
49547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
49647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
49747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
49847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte argument greater than the given value. For details, see
49947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
50047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
50147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
50247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
50347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
50447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
50547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte gt(byte value) {
50647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterThan<Byte>(value));
50747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
50847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
50947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
51047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
51147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double argument greater than the given value. For details, see
51247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
51347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
51447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
51547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
51647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
51747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
51847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double gt(double value) {
51947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterThan<Double>(value));
52047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
52147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
52247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
52347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
52447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float argument greater than the given value. For details, see
52547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
52647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
52747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
52847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
52947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
53047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
53147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float gt(float value) {
53247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterThan<Float>(value));
53347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
53447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
53547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
53647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
53747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int argument greater than the given value. For details, see
53847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
53947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
54047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
54147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
54247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
54347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
54447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int gt(int value) {
54547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterThan<Integer>(value));
54647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
54747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
54847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
54947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
55047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long argument greater than the given value. For details, see
55147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
55247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
55347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
55447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
55547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
55647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
55747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long gt(long value) {
55847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterThan<Long>(value));
55947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
56047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
56147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
56247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
56347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short argument greater than the given value. For details, see
56447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
56547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
56647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
56747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
56847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
56947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
57047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short gt(short value) {
57147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new GreaterThan<Short>(value));
57247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
57347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
57447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
57547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
57647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a comparable argument less than the given value. For details, see
57747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
57847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
57947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
58047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
58147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
58247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
58347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
58447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T extends Comparable<T>> T lt(Comparable<T> value) {
58547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessThan<T>(value));
58647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
58747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
58847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
58947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
59047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte argument less than the given value. For details, see the
59147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
59247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
59347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
59447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
59547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
59647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
59747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte lt(byte value) {
59847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessThan<Byte>(value));
59947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
60047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
60147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
60247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
60347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double argument less than the given value. For details, see the
60447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
60547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
60647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
60747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
60847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
60947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
61047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double lt(double value) {
61147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessThan<Double>(value));
61247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
61347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
61447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
61547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
61647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float argument less than the given value. For details, see the
61747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
61847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
61947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
62047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
62147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
62247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
62347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float lt(float value) {
62447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessThan<Float>(value));
62547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
62647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
62747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
62847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
62947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int argument less than the given value. For details, see the
63047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
63147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
63247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
63347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
63447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
63547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
63647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int lt(int value) {
63747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessThan<Integer>(value));
63847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
63947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
64047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
64147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
64247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long argument less than the given value. For details, see the
64347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
64447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
64547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
64647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
64747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
64847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
64947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long lt(long value) {
65047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessThan<Long>(value));
65147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
65247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
65347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
65447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
65547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short argument less than the given value. For details, see the
65647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
65747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
65847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
65947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
66047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
66147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
66247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short lt(short value) {
66347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new LessThan<Short>(value));
66447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
66547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
66647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
66747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
66847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an object implementing the given class. For details, see the
66947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
67047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
67147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
67247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the accepted type.
67347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param clazz
67447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the class of the accepted type.
67547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
67647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
67747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T isA(Class<T> clazz) {
67847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new InstanceOf(clazz));
67947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
68047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
68147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
68247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
68347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a string that contains the given substring. For details, see the
68447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
68547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
68647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param substring
68747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the substring.
68847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
68947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
69047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static String contains(String substring) {
69147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Contains(substring));
69247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
69347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
69447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
69547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
69647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a boolean that matches both given expectations.
69747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
69847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
69947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
70047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
70147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
70247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>false</code>.
70347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
70447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static boolean and(boolean first, boolean second) {
70547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
70647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return false;
70747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
70847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
70947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
71047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte that matches both given expectations.
71147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
71247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
71347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
71447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
71547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
71647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
71747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
71847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte and(byte first, byte second) {
71947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
72047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
72147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
72247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
72347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
72447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a char that matches both given expectations.
72547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
72647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
72747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
72847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
72947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
73047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
73147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
73247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static char and(char first, char second) {
73347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
73447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
73547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
73647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
73747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
73847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double that matches both given expectations.
73947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
74047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
74147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
74247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
74347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
74447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
74547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
74647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double and(double first, double second) {
74747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
74847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
74947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
75047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
75147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
75247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float that matches both given expectations.
75347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
75447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
75547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
75647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
75747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
75847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
75947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
76047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float and(float first, float second) {
76147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
76247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
76347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
76447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
76547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
76647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int that matches both given expectations.
76747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
76847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
76947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
77047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
77147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
77247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
77347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
77447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int and(int first, int second) {
77547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
77647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
77747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
77847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
77947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
78047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long that matches both given expectations.
78147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
78247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
78347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
78447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
78547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
78647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
78747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
78847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long and(long first, long second) {
78947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
79047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
79147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
79247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
79347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
79447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short that matches both given expectations.
79547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
79647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
79747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
79847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
79947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
80047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
80147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
80247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short and(short first, short second) {
80347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
80447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
80547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
80647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
80747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
80847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an Object that matches both given expectations.
80947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
81047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
81147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the type of the object, it is passed through to prevent casts.
81247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
81347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
81447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
81547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
81647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
81747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
81847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T and(T first, T second) {
81947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportAnd(2);
82047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
82147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
82247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
82347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
82447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a boolean that matches one of the given expectations.
82547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
82647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
82747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
82847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
82947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
83047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>false</code>.
83147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
83247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static boolean or(boolean first, boolean second) {
83347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
83447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return false;
83547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
83647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
83747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
83847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte that matches one of the given expectations.
83947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
84047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
84147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
84247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
84347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
84447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
84547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
84647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte or(byte first, byte second) {
84747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
84847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
84947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
85047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
85147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
85247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a char that matches one of the given expectations.
85347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
85447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
85547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
85647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
85747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
85847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
85947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
86047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static char or(char first, char second) {
86147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
86247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
86347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
86447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
86547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
86647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double that matches one of the given expectations.
86747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
86847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
86947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
87047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
87147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
87247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
87347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
87447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double or(double first, double second) {
87547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
87647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
87747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
87847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
87947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
88047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float that matches one of the given expectations.
88147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
88247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
88347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
88447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
88547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
88647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
88747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
88847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float or(float first, float second) {
88947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
89047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
89147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
89247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
89347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
89447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int that matches one of the given expectations.
89547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
89647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
89747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
89847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
89947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
90047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
90147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
90247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int or(int first, int second) {
90347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
90447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return first;
90547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
90647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
90747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
90847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long that matches one of the given expectations.
90947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
91047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
91147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
91247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
91347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
91447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
91547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
91647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long or(long first, long second) {
91747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
91847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
91947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
92047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
92147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
92247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short that matches one of the given expectations.
92347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
92447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
92547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
92647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
92747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
92847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
92947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
93047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short or(short first, short second) {
93147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
93247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
93347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
93447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
93547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
93647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an Object that matches one of the given expectations.
93747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
93847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
93947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the type of the object, it is passed through to prevent casts.
94047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
94147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the first expectation.
94247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param second
94347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the second expectation.
94447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
94547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
94647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T or(T first, T second) {
94747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportOr(2);
94847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
94947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
95047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
95147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
95247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a boolean that does not match the given expectation.
95347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
95447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
95547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
95647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>false</code>.
95747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
95847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static boolean not(boolean first) {
95947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
96047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return false;
96147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
96247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
96347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
96447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte that does not match the given expectation.
96547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
96647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
96747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
96847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
96947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
97047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte not(byte first) {
97147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
97247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
97347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
97447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
97547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
97647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a char that does not match the given expectation.
97747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
97847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
97947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
98047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
98147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
98247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static char not(char first) {
98347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
98447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
98547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
98647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
98747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
98847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double that does not match the given expectation.
98947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
99047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
99147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
99247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
99347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
99447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double not(double first) {
99547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
99647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
99747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
99847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
99947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
100047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float that does not match the given expectation.
100147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
100247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
100347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
100447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
100547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
100647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float not(float first) {
100747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
100847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return first;
100947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
101047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
101147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
101247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int that does not match the given expectation.
101347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
101447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
101547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
101647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
101747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
101847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int not(int first) {
101947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
102047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
102147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
102247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
102347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
102447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long that does not match the given expectation.
102547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
102647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
102747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
102847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
102947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
103047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long not(long first) {
103147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
103247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
103347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
103447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
103547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
103647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short that does not match the given expectation.
103747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
103847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
103947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
104047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
104147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
104247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short not(short first) {
104347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
104447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
104547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
104647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
104747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
104847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an Object that does not match the given expectation.
104947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
105047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
105147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the type of the object, it is passed through to prevent casts.
105247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param first
105347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            placeholder for the expectation.
105447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
105547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
105647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T not(T first) {
105747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportNot();
105847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
105947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
106047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
106147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
106247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a boolean that is equal to the given value.
106347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
106447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
106547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
106647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
106747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
106847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static boolean eq(boolean value) {
106947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
107047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return false;
107147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
107247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
107347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
107447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte that is equal to the given value.
107547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
107647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
107747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
107847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
107947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
108047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte eq(byte value) {
108147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
108247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
108347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
108447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
108547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
108647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a char that is equal to the given value.
108747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
108847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
108947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
109047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
109147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
109247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static char eq(char value) {
109347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
109447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
109547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
109647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
109747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
109847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double that is equal to the given value.
109947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
110047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
110147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
110247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
110347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
110447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double eq(double value) {
110547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
110647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
110747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
110847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
110947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
111047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float that is equal to the given value.
111147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
111247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
111347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
111447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
111547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
111647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float eq(float value) {
111747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
111847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
111947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
112047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
112147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
112247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int that is equal to the given value.
112347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
112447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
112547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
112647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
112747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
112847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int eq(int value) {
112947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
113047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
113147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
113247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
113347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
113447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long that is equal to the given value.
113547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
113647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
113747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
113847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
113947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
114047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long eq(long value) {
114147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
114247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
114347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
114447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
114547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
114647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short that is equal to the given value.
114747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
114847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
114947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
115047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
115147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
115247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short eq(short value) {
115347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
115447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
115547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
115647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
115747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
115847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an Object that is equal to the given value.
115947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
116047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
116147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
116247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
116347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
116447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
116547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T eq(T value) {
116647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Equals(value));
116747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
116847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
116947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
117047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
117147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a boolean array that is equal to the given array, i.e. it has to
117247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
117347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
117447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
117547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
117647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
117747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
117847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static boolean[] aryEq(boolean[] value) {
117947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
118047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
118147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
118247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
118347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
118447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte array that is equal to the given array, i.e. it has to
118547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
118647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
118747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
118847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
118947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
119047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
119147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static byte[] aryEq(byte[] value) {
119247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
119347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
119447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
119547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
119647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
119747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a char array that is equal to the given array, i.e. it has to
119847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
119947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
120047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
120147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
120247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
120347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
120447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static char[] aryEq(char[] value) {
120547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
120647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
120747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
120847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
120947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
121047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double array that is equal to the given array, i.e. it has to
121147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
121247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
121347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
121447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
121547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
121647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
121747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double[] aryEq(double[] value) {
121847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
121947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
122047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
122147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
122247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
122347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float array that is equal to the given array, i.e. it has to
122447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
122547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
122647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
122747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
122847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
122947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
123047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float[] aryEq(float[] value) {
123147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
123247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
123347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
123447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
123547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
123647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an int array that is equal to the given array, i.e. it has to
123747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
123847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
123947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
124047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
124147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
124247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
124347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static int[] aryEq(int[] value) {
124447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
124547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
124647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
124747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
124847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
124947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a long array that is equal to the given array, i.e. it has to
125047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
125147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
125247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
125347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
125447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
125547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
125647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static long[] aryEq(long[] value) {
125747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
125847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
125947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
126047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
126147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
126247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a short array that is equal to the given array, i.e. it has to
126347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same length, and each element has to be equal.
126447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
126547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
126647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
126747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
126847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
126947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static short[] aryEq(short[] value) {
127047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
127147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
127247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
127347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
127447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
127547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an Object array that is equal to the given array, i.e. it has to
127647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * have the same type, length, and each element has to be equal.
127747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
127847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
127947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the type of the array, it is passed through to prevent casts.
128047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
128147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given arry.
128247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
128347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
128447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T[] aryEq(T[] value) {
128547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new ArrayEquals(value));
128647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
128747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
128847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
128947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
129047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects null.
129147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
129247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
129347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
129447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
129547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T isNull() {
129647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(Null.NULL);
129747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
129847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
129947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
130047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
130147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects not null.
130247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
130347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
130447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
130547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
130647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T notNull() {
130747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(NotNull.NOT_NULL);
130847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
130947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
131047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
131147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
131247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a string that contains a substring that matches the given regular
131347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * expression. For details, see the EasyMock documentation.
131447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
131547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param regex
131647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the regular expression.
131747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
131847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
131947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static String find(String regex) {
132047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Find(regex));
132147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
132247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
132347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
132447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
132547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a string that matches the given regular expression. For details,
132647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * see the EasyMock documentation.
132747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
132847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param regex
132947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the regular expression.
133047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
133147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
133247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static String matches(String regex) {
133347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Matches(regex));
133447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
133547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
133647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
133747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
133847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a string that starts with the given prefix. For details, see the
133947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
134047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
134147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param prefix
134247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the prefix.
134347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
134447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
134547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static String startsWith(String prefix) {
134647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new StartsWith(prefix));
134747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
134847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
134947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
135047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
135147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a string that ends with the given suffix. For details, see the
135247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * EasyMock documentation.
135347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
135447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param suffix
135547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the suffix.
135647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
135747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
135847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static String endsWith(String suffix) {
135947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new EndsWith(suffix));
136047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
136147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
136247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
136347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
136447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a double that has an absolute difference to the given value that
136547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is less than the given delta. For details, see the EasyMock
136647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * documentation.
136747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
136847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
136947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
137047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param delta
137147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given delta.
137247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
137347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
137447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static double eq(double value, double delta) {
137547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new EqualsWithDelta(value, delta));
137647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
137747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
137847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
137947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
138047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a float that has an absolute difference to the given value that
138147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * is less than the given delta. For details, see the EasyMock
138247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * documentation.
138347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
138447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
138547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
138647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param delta
138747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given delta.
138847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
138947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
139047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static float eq(float value, float delta) {
139147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new EqualsWithDelta(value, delta));
139247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return 0;
139347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
139447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
139547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
139647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an Object that is the same as the given value. For details, see
139747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
139847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
139947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T>
140047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the type of the object, it is passed through to prevent casts.
140147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
140247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
140347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
140447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
140547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T same(T value) {
140647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Same(value));
140747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
140847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
140947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
141047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
141147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a comparable argument equals to the given value according to their
141247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * compareTo method. For details, see the EasMock documentation.
141347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
141447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
141547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
141647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
141747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>.
141847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
141947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T extends Comparable<T>> T cmpEq(Comparable<T> value) {
142047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new CompareEqual<T>(value));
142147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
142247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
142347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
142447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
142547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects an argument that will be compared using the provided comparator.
142647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * The following comparison will take place:
142747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <p>
142847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <code>comparator.compare(actual, expected) operator 0</code>
142947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * </p>
143047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * For details, see the EasyMock documentation.
143147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
143247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> type of the method argument to match
143347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value the given value.
143447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param comparator Comparator used to compare the actual with expected value.
143547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param operator The comparison operator.
143647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>
143747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
143847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T cmp(T value, Comparator<? super T> comparator, LogicalOperator operator) {
143947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Compare<T>(value, comparator, operator));
144047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
144147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
144247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
144347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
144447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
144547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expects a byte that is equal to the given value.
144647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
144747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
144847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the given value.
144947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>.
145047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
145147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
145247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
145347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
145447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expect any object but captures it for later use.
145547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
145647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param <T> Type of the captured object
145747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param captured Where the parameter is captured
145847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>null</code>
145947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
146047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static <T> T capture(Capture<T> captured) {
146147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        reportMatcher(new Captures<T>(captured));
146247d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return null;
146347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
146447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
146547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /******************************************************
146647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * ANDROID CHANGE - comment out to fix compile error
146747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * name clash: capture(org.easymock.Capture<java.lang.Long>) and
146847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *  <T>capture(org.easymock.Capture<T>) have the same erasure
146947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
147047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
147147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expect any int but captures it for later use.
147247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
147347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param captured Where the parameter is captured
147447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>
147547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
147647d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    public static int capture(Capture<Integer> captured) {
147747d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        reportMatcher(new Captures<Integer>(captured));
147847d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        return 0;
147947d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    }
148047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
148147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
148247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expect any long but captures it for later use.
148347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
148447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param captured Where the parameter is captured
148547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>
148647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
148747d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    public static long capture(Capture<Long> captured) {
148847d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        reportMatcher(new Captures<Long>(captured));
148947d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        return 0;
149047d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    }
149147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
149247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
149347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expect any float but captures it for later use.
149447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
149547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param captured Where the parameter is captured
149647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>
149747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
149847d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    public static float capture(Capture<Float> captured) {
149947d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        reportMatcher(new Captures<Float>(captured));
150047d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        return 0;
150147d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    }
150247d431f63a66505a645f282416659a9758a91f1cBrett Chabot
150347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
150447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expect any double but captures it for later use.
150547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
150647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param captured Where the parameter is captured
150747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>
150847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
150947d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    public static double capture(Capture<Double> captured) {
151047d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        reportMatcher(new Captures<Double>(captured));
151147d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        return 0;
151247d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    }
151347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
151447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
151547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expect any byte but captures it for later use.
151647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
151747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param captured Where the parameter is captured
151847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>
151947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
152047d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    public static byte capture(Capture<Byte> captured) {
152147d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        reportMatcher(new Captures<Byte>(captured));
152247d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        return 0;
152347d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    }
152447d431f63a66505a645f282416659a9758a91f1cBrett Chabot
152547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
152647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Expect any char but captures it for later use.
152747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
152847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param captured Where the parameter is captured
152947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return <code>0</code>
153047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
153147d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    public static char capture(Capture<Character> captured) {
153247d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        reportMatcher(new Captures<Character>(captured));
153347d431f63a66505a645f282416659a9758a91f1cBrett Chabot//        return 0;
153447d431f63a66505a645f282416659a9758a91f1cBrett Chabot//    }
153547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
153647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**********  END ANDROID CHANGE **********/
153747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
153847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
153947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Switches the given mock objects (more exactly: the controls of the mock
154047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * objects) to replay mode. For details, see the EasyMock documentation.
154147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
154247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mocks
154347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock objects.
154447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
154547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void replay(Object... mocks) {
154647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        for (Object mock : mocks) {
154747d431f63a66505a645f282416659a9758a91f1cBrett Chabot            getControl(mock).replay();
154847d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
154947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
155047d431f63a66505a645f282416659a9758a91f1cBrett Chabot
155147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
155247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Resets the given mock objects (more exactly: the controls of the mock
155347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * objects). For details, see the EasyMock documentation.
155447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
155547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mocks
155647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock objects.
155747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
155847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void reset(Object... mocks) {
155947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        for (Object mock : mocks) {
156047d431f63a66505a645f282416659a9758a91f1cBrett Chabot            getControl(mock).reset();
156147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
156247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
156347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
156447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
156547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Resets the given mock objects (more exactly: the controls of the mock
156647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * objects) and turn them to a mock with nice behavior. For details, see
156747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
156847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
156947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mocks
157047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock objects
157147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
157247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void resetToNice(Object... mocks) {
157347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        for (Object mock : mocks) {
157447d431f63a66505a645f282416659a9758a91f1cBrett Chabot            getControl(mock).resetToNice();
157547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
157647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
157747d431f63a66505a645f282416659a9758a91f1cBrett Chabot
157847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
157947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Resets the given mock objects (more exactly: the controls of the mock
158047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * objects) and turn them to a mock with default behavior. For details, see
158147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
158247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
158347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mocks
158447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock objects
158547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
158647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void resetToDefault(Object... mocks) {
158747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        for (Object mock : mocks) {
158847d431f63a66505a645f282416659a9758a91f1cBrett Chabot            getControl(mock).resetToDefault();
158947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
159047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
159147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
159247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
159347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Resets the given mock objects (more exactly: the controls of the mock
159447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * objects) and turn them to a mock with strict behavior. For details, see
159547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * the EasyMock documentation.
159647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
159747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mocks
159847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock objects
159947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
160047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void resetToStrict(Object... mocks) {
160147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        for (Object mock : mocks) {
160247d431f63a66505a645f282416659a9758a91f1cBrett Chabot            getControl(mock).resetToStrict();
160347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
160447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
160547d431f63a66505a645f282416659a9758a91f1cBrett Chabot
160647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
160747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Verifies the given mock objects (more exactly: the controls of the mock
160847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * objects).
160947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
161047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mocks
161147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock objects.
161247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
161347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void verify(Object... mocks) {
161447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        for (Object mock : mocks) {
161547d431f63a66505a645f282416659a9758a91f1cBrett Chabot            getControl(mock).verify();
161647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
161747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
161847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
161947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
162047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Switches order checking of the given mock object (more exactly: the
162147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * control of the mock object) the on and off. For details, see the EasyMock
162247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * documentation.
162347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
162447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mock
162547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock object.
162647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param state
162747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            <code>true</code> switches order checking on,
162847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            <code>false</code> switches it off.
162947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
163047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void checkOrder(Object mock, boolean state) {
163147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        getControl(mock).checkOrder(state);
163247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
163347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
163447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
163547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Reports an argument matcher. This method is needed to define own argument
163647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * matchers. For details, see the EasyMock documentation.
163747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
163847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param matcher
163947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
164047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void reportMatcher(IArgumentMatcher matcher) {
164147d431f63a66505a645f282416659a9758a91f1cBrett Chabot        LastControl.reportMatcher(matcher);
164247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
164347d431f63a66505a645f282416659a9758a91f1cBrett Chabot
164447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    private static MocksControl getControl(Object mock) {
164547d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return ((ObjectMethodsFilter) Proxy
164647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        .getInvocationHandler(mock)).getDelegate().getControl();
164747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
164847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
164947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
165047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Returns the arguments of the current mock method call, if inside an
165147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <code>IAnswer</code> callback - be careful here, reordering parameters of
165247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * method changes the semantics of your tests.
165347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
165447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the arguments of the current mock method call.
165547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @throws IllegalStateException
165647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *             if called outside of <code>IAnswer</code> callbacks.
165747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
165847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static Object[] getCurrentArguments() {
165947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        Invocation result = LastControl.getCurrentInvocation();
166047d431f63a66505a645f282416659a9758a91f1cBrett Chabot        if (result == null) {
166147d431f63a66505a645f282416659a9758a91f1cBrett Chabot            throw new IllegalStateException(
166247d431f63a66505a645f282416659a9758a91f1cBrett Chabot                    "current arguments are only available when executing callback methods");
166347d431f63a66505a645f282416659a9758a91f1cBrett Chabot        }
166447d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return result.getArguments();
166547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
166647d431f63a66505a645f282416659a9758a91f1cBrett Chabot
166747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
166847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * By default, a mock is thread safe (unless
166947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * {@link #NOT_THREAD_SAFE_BY_DEFAULT} is set). This method can change this
167047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * behavior. Two reasons are known for someone to do that: Performance or
167147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * dead-locking issues.
167247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
167347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mock
167447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock to make thread safe
167547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param threadSafe
167647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            If the mock should be thread safe or not
167747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
167847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void makeThreadSafe(Object mock, boolean threadSafe) {
167947d431f63a66505a645f282416659a9758a91f1cBrett Chabot        getControl(mock).makeThreadSafe(threadSafe);
168047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
168147d431f63a66505a645f282416659a9758a91f1cBrett Chabot
168247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
168347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Tell that the mock should be used in only one thread. An exception will
168447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * be thrown if that's not the case. This can be useful when mocking an
168547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * object that isn't thread safe to make sure it is used correctly in a
168647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * multithreaded environment. By default, no check is done unless
168747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * {@link #ENABLE_THREAD_SAFETY_CHECK_BY_DEFAULT} was set to true.
168847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
168947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param mock
169047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            the mock
169147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param shouldBeUsedInOneThread
169247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            If the mock should be used in only one thread
169347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
169447d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static void checkIsUsedInOneThread(Object mock,
169547d431f63a66505a645f282416659a9758a91f1cBrett Chabot            boolean shouldBeUsedInOneThread) {
169647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        getControl(mock).checkIsUsedInOneThread(shouldBeUsedInOneThread);
169747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
169847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
169947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
170047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Get the current value for an EasyMock property
170147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
170247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param key
170347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            key for the property
170447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the property value
170547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
170647d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static String getEasyMockProperty(String key) {
170747d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return EasyMockProperties.getInstance().getProperty(key);
170847d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
170947d431f63a66505a645f282416659a9758a91f1cBrett Chabot
171047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /**
171147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * Set a property to modify the default EasyMock behavior. These properties
171247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * can also be set as System properties or in easymock.properties. This
171347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * method can then be called to overload them. For details and a list of
171447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * available properties see the EasyMock documentation.
171547d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <p>
171647d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * <b>Note:</b> This method is static. Setting a property will change the
171747d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * entire EasyMock behavior.
171847d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *
171947d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param key
172047d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            property key
172147d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @param value
172247d431f63a66505a645f282416659a9758a91f1cBrett Chabot     *            property value. A null value will remove the property
172347d431f63a66505a645f282416659a9758a91f1cBrett Chabot     * @return the previous property value
172447d431f63a66505a645f282416659a9758a91f1cBrett Chabot     */
172547d431f63a66505a645f282416659a9758a91f1cBrett Chabot    public static String setEasyMockProperty(String key, String value) {
172647d431f63a66505a645f282416659a9758a91f1cBrett Chabot        return EasyMockProperties.getInstance().setProperty(key, value);
172747d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
172847d431f63a66505a645f282416659a9758a91f1cBrett Chabot
172947d431f63a66505a645f282416659a9758a91f1cBrett Chabot    // ///CLOVER:OFF
173047d431f63a66505a645f282416659a9758a91f1cBrett Chabot    /** Prevent instantiation but allow inheritance */
173147d431f63a66505a645f282416659a9758a91f1cBrett Chabot    protected EasyMock() {
173247d431f63a66505a645f282416659a9758a91f1cBrett Chabot    }
173347d431f63a66505a645f282416659a9758a91f1cBrett Chabot    // ///CLOVER:ON
173447d431f63a66505a645f282416659a9758a91f1cBrett Chabot}
1735