[easymock] 01/08: Imported Upstream version 3.3+ds

Markus Koschany apo-guest at moszumanska.debian.org
Tue Nov 25 17:51:09 GMT 2014


This is an automated email from the git hooks/post-receive script.

apo-guest pushed a commit to branch master
in repository easymock.

commit 0b3e38c588e64d3a25832e302be1809a1f62bc91
Author: Markus Koschany <apo at gambaru.de>
Date:   Tue Nov 25 18:00:35 2014 +0100

    Imported Upstream version 3.3+ds
---
 Documentation.html                                 | 1186 -------------------
 Documentation_fr.html                              | 1251 --------------------
 easymock.css                                       |  106 --
 ...ockTest.java => AnnotatedMockWithRuleTest.java} |   94 +-
 ...kTest.java => AnnotatedMockWithRunnerTest.java} |   10 +-
 .../org/easymock/samples/BasicClassMockTest.java   |    2 +-
 samples/org/easymock/samples/ClassTested.java      |    8 +-
 samples/org/easymock/samples/Collaborator.java     |    2 +-
 .../samples/ConstructorCalledMockTest.java         |    2 +-
 samples/org/easymock/samples/ExampleTest.java      |   76 +-
 .../org/easymock/samples/PartialClassMockTest.java |    2 +-
 samples/org/easymock/samples/SupportTest.java      |    6 +-
 samples/org/easymock/samples/ThrowableEquals.java  |    2 +-
 src/org/easymock/Capture.java                      |   32 +-
 src/org/easymock/CaptureType.java                  |    2 +-
 src/org/easymock/ConstructorArgs.java              |    2 +-
 src/org/easymock/EasyMock.java                     |   28 +-
 src/org/easymock/EasyMockRule.java                 |   41 +
 src/org/easymock/EasyMockRunner.java               |   41 +-
 src/org/easymock/EasyMockSupport.java              |  126 +-
 src/org/easymock/IAnswer.java                      |    2 +-
 src/org/easymock/IArgumentMatcher.java             |    2 +-
 src/org/easymock/IExpectationSetters.java          |   14 +-
 src/org/easymock/IMockBuilder.java                 |    2 +-
 src/org/easymock/IMocksControl.java                |    2 +-
 src/org/easymock/LogicalOperator.java              |    2 +-
 src/org/easymock/Mock.java                         |   18 +-
 src/org/easymock/MockType.java                     |    2 +-
 src/org/easymock/TestSubject.java                  |    4 +-
 .../internal/AndroidClassProxyFactory.java         |    2 +-
 src/org/easymock/internal/AndroidSupport.java      |    8 +-
 src/org/easymock/internal/ArgumentToString.java    |    2 +-
 .../easymock/internal/AssertionErrorWrapper.java   |    2 +-
 .../easymock/internal/BridgeMethodResolver.java    |    2 +-
 .../internal/ClassInstantiatorFactory.java         |    2 +-
 src/org/easymock/internal/ClassProxyFactory.java   |    2 +-
 .../internal/DefaultClassInstantiator.java         |    2 +-
 src/org/easymock/internal/EasyMockProperties.java  |    2 +-
 .../EasyMockStatement.java}                        |  103 +-
 src/org/easymock/internal/ErrorMessage.java        |    2 +-
 src/org/easymock/internal/ExpectedInvocation.java  |    2 +-
 .../internal/ExpectedInvocationAndResult.java      |    2 +-
 .../internal/ExpectedInvocationAndResults.java     |    2 +-
 src/org/easymock/internal/IClassInstantiator.java  |    2 +-
 src/org/easymock/internal/IMocksBehavior.java      |    2 +-
 src/org/easymock/internal/IMocksControlState.java  |    4 +-
 src/org/easymock/internal/IProxyFactory.java       |    2 +-
 src/org/easymock/internal/Injection.java           |   84 ++
 src/org/easymock/internal/InjectionPlan.java       |   98 ++
 src/org/easymock/internal/InjectionTarget.java     |   76 ++
 src/org/easymock/internal/Injector.java            |  243 ++++
 src/org/easymock/internal/Invocation.java          |    2 +-
 src/org/easymock/internal/JavaProxyFactory.java    |    2 +-
 src/org/easymock/internal/LastControl.java         |   47 +-
 .../internal/MethodSerializationWrapper.java       |    2 +-
 src/org/easymock/internal/MockBuilder.java         |    2 +-
 .../easymock/internal/MockInvocationHandler.java   |    2 +-
 src/org/easymock/internal/MocksBehavior.java       |    2 +-
 src/org/easymock/internal/MocksControl.java        |   43 +-
 src/org/easymock/internal/ObjectMethodsFilter.java |    2 +-
 .../internal/ObjenesisClassInstantiator.java       |    2 +-
 src/org/easymock/internal/Range.java               |    2 +-
 src/org/easymock/internal/RecordState.java         |   11 +-
 src/org/easymock/internal/ReflectionUtils.java     |    2 +-
 src/org/easymock/internal/ReplayState.java         |    6 +-
 src/org/easymock/internal/Result.java              |    2 +-
 src/org/easymock/internal/Results.java             |    2 +-
 .../easymock/internal/RuntimeExceptionWrapper.java |    2 +-
 src/org/easymock/internal/ThrowableWrapper.java    |    2 +-
 src/org/easymock/internal/UnorderedBehavior.java   |    2 +-
 src/org/easymock/internal/matchers/And.java        |    2 +-
 src/org/easymock/internal/matchers/Any.java        |    2 +-
 .../easymock/internal/matchers/ArrayEquals.java    |    2 +-
 src/org/easymock/internal/matchers/Captures.java   |    2 +-
 src/org/easymock/internal/matchers/Compare.java    |    2 +-
 .../easymock/internal/matchers/CompareEqual.java   |    2 +-
 src/org/easymock/internal/matchers/CompareTo.java  |    2 +-
 src/org/easymock/internal/matchers/Contains.java   |    2 +-
 src/org/easymock/internal/matchers/EndsWith.java   |    2 +-
 src/org/easymock/internal/matchers/Equals.java     |    2 +-
 .../internal/matchers/EqualsWithDelta.java         |    2 +-
 src/org/easymock/internal/matchers/Find.java       |    2 +-
 .../easymock/internal/matchers/GreaterOrEqual.java |    2 +-
 .../easymock/internal/matchers/GreaterThan.java    |    2 +-
 src/org/easymock/internal/matchers/InstanceOf.java |    2 +-
 .../easymock/internal/matchers/LessOrEqual.java    |    2 +-
 src/org/easymock/internal/matchers/LessThan.java   |    2 +-
 src/org/easymock/internal/matchers/Matches.java    |    2 +-
 src/org/easymock/internal/matchers/Not.java        |    2 +-
 src/org/easymock/internal/matchers/NotNull.java    |    2 +-
 src/org/easymock/internal/matchers/Null.java       |    2 +-
 src/org/easymock/internal/matchers/Or.java         |    2 +-
 src/org/easymock/internal/matchers/Same.java       |    2 +-
 src/org/easymock/internal/matchers/StartsWith.java |    2 +-
 tests/org/easymock/tests/ArgumentToStringTest.java |    2 +-
 .../org/easymock/tests/BaseEasyMockRunnerTest.java |    2 +-
 tests/org/easymock/tests/CapturesMatcherTest.java  |    2 +-
 tests/org/easymock/tests/CglibTest.java            |   13 +-
 .../tests/ClassInstantiatorFactoryTest.java        |    2 +-
 tests/org/easymock/tests/ConstructorTest.java      |    2 +-
 .../tests/DefaultClassInstantiatorTest.java        |    2 +-
 tests/org/easymock/tests/ErrorMessageTest.java     |    2 +-
 .../org/easymock/tests/ExpectedMethodCallTest.java |    2 +-
 tests/org/easymock/tests/GenericTest.java          |    2 +-
 tests/org/easymock/tests/IMethods.java             |    2 +-
 tests/org/easymock/tests/IVarArgs.java             |    2 +-
 tests/org/easymock/tests/InvocationTest.java       |    2 +-
 tests/org/easymock/tests/LimitationsTest.java      |    2 +-
 .../org/easymock/tests/MatchableArgumentsTest.java |    2 +-
 .../tests/MethodSerializationWrapperTest.java      |    2 +-
 tests/org/easymock/tests/MockClassControlTest.java |    2 +-
 tests/org/easymock/tests/MockNameTest.java         |    2 +-
 tests/org/easymock/tests/MockTypeTest.java         |    2 +-
 tests/org/easymock/tests/MockingTest.java          |    2 +-
 ...ceMockControlLongCompatibleReturnValueTest.java |    2 +-
 tests/org/easymock/tests/NiceMockControlTest.java  |    2 +-
 tests/org/easymock/tests/ObjectMethodsTest.java    |    2 +-
 .../RecordStateInvalidDefaultReturnValueTest.java  |    2 +-
 .../RecordStateInvalidDefaultThrowableTest.java    |    2 +-
 .../tests/RecordStateInvalidRangeTest.java         |    2 +-
 .../tests/RecordStateInvalidReturnValueTest.java   |    2 +-
 .../tests/RecordStateInvalidStateChangeTest.java   |    2 +-
 .../tests/RecordStateInvalidThrowableTest.java     |    2 +-
 .../tests/RecordStateInvalidUsageTest.java         |    2 +-
 .../tests/RecordStateMethodCallMissingTest.java    |   12 +-
 .../tests/ReplayStateInvalidCallsTest.java         |    7 +-
 .../tests/ReplayStateInvalidUsageTest.java         |    2 +-
 tests/org/easymock/tests/ResultTest.java           |    2 +-
 tests/org/easymock/tests/StacktraceTest.java       |    2 +-
 tests/org/easymock/tests/UsageCallCountTest.java   |    2 +-
 .../tests/UsageDefaultReturnValueTest.java         |    2 +-
 .../tests/UsageExpectAndDefaultReturnTest.java     |    2 +-
 .../tests/UsageExpectAndDefaultThrowTest.java      |    2 +-
 .../easymock/tests/UsageExpectAndReturnTest.java   |    2 +-
 .../easymock/tests/UsageExpectAndThrowTest.java    |    2 +-
 .../tests/UsageFloatingPointReturnValueTest.java   |    2 +-
 .../tests/UsageLongCompatibleReturnValueTest.java  |    2 +-
 .../tests/UsageOverloadedDefaultValueTest.java     |    2 +-
 .../easymock/tests/UsageOverloadedMethodTest.java  |    2 +-
 tests/org/easymock/tests/UsageRangeTest.java       |    2 +-
 tests/org/easymock/tests/UsageStrictMockTest.java  |    2 +-
 tests/org/easymock/tests/UsageTest.java            |   43 +-
 tests/org/easymock/tests/UsageThrowableTest.java   |    2 +-
 tests/org/easymock/tests/UsageUnorderedTest.java   |    2 +-
 tests/org/easymock/tests/UsageVarargTest.java      |    2 +-
 tests/org/easymock/tests/UsageVerifyTest.java      |    2 +-
 tests/org/easymock/tests/Util.java                 |    2 +-
 tests/org/easymock/tests2/AnswerTest.java          |    2 +-
 .../easymock/tests2/CallbackAndArgumentsTest.java  |    2 +-
 tests/org/easymock/tests2/CallbackTest.java        |    2 +-
 tests/org/easymock/tests2/CaptureTest.java         |   84 +-
 tests/org/easymock/tests2/ChildEquals.java         |    2 +-
 .../easymock/tests2/ClassExtensionHelperTest.java  |    2 +-
 tests/org/easymock/tests2/CompareToTest.java       |    2 +-
 .../easymock/tests2/ConstraintsToStringTest.java   |    2 +-
 tests/org/easymock/tests2/ConstructorArgsTest.java |    2 +-
 tests/org/easymock/tests2/DelegateToTest.java      |    2 +-
 tests/org/easymock/tests2/DependencyTest.java      |    2 +-
 .../easymock/tests2/EasyMockAnnotationsTest.java   |  347 ++++++
 .../tests2/EasyMockClassExtensionTest.java         |    2 +-
 .../easymock/tests2/EasyMockPropertiesTest.java    |    2 +-
 .../{ChildEquals.java => EasyMockRuleTest.java}    |   18 +-
 tests/org/easymock/tests2/EasyMockRunnerTest.java  |   97 +-
 .../easymock/tests2/EasyMockSupportClassTest.java  |    2 +-
 tests/org/easymock/tests2/EasyMockSupportTest.java |    2 +-
 tests/org/easymock/tests2/FilteringRule.java       |    2 +-
 tests/org/easymock/tests2/MockBuilderTest.java     |    2 +-
 tests/org/easymock/tests2/MockedExceptionTest.java |    2 +-
 tests/org/easymock/tests2/MocksControlTest.java    |   13 +-
 tests/org/easymock/tests2/NameTest.java            |    2 +-
 tests/org/easymock/tests2/NiceMockTest.java        |    2 +-
 tests/org/easymock/tests2/ParentEquals.java        |    2 +-
 tests/org/easymock/tests2/PartialMockingTest.java  |    2 +-
 tests/org/easymock/tests2/ReflectionUtilsTest.java |    2 +-
 tests/org/easymock/tests2/SerializationTest.java   |    2 +-
 tests/org/easymock/tests2/StubTest.java            |    2 +-
 tests/org/easymock/tests2/ThreadingTest.java       |    2 +-
 .../org/easymock/tests2/UsageConstraintsTest.java  |    2 +-
 tests/org/easymock/tests2/UsageMatchersTest.java   |    2 +-
 tests/org/easymock/tests2/UsageStrictMockTest.java |    2 +-
 tests/org/easymock/tests2/UsageTest.java           |    2 +-
 181 files changed, 1513 insertions(+), 3175 deletions(-)

diff --git a/Documentation.html b/Documentation.html
deleted file mode 100644
index 193ae2b..0000000
--- a/Documentation.html
+++ /dev/null
@@ -1,1186 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />	
-<title>EasyMock 3.2 Readme</title>
-<link rel="stylesheet" href="easymock.css" />
-</head>
-<body><div class="bodywidth">
-
-<h2>EasyMock 3.2 Readme</h2>
- 
-<p>Documentation for release 3.2 (2013-07-11)<br />
-© 2001-2013 <a href="http://www.offis.de">OFFIS</a>, <a href="http://tammofreese.de">Tammo Freese</a>, <a href="http://henritremblay.blogspot.fr/">Henri Tremblay</a>.
-</p>
-<p>
-EasyMock is a library that provides an easy way to use Mock Objects for given
-interfaces or classes. EasyMock is available under the terms of the <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">Apache 2 license</a>.
-</p>
-<p>
-Mock Objects simulate parts of the behavior of domain code,
-and are able to check whether they are used as defined.
-Domain classes can be tested in isolation
-by simulating their collaborators with Mock Objects.
-</p>
-<p>
-Writing and maintaining Mock Objects often is a tedious
-task that may introduce errors. EasyMock generates Mock Objects
-dynamically - no need to write them, and no generated code!
-</p>
-<h2>
-EasyMock Benefits
-</h2>
-<ul>
-<li>Hand-writing classes for Mock Objects is not needed.
-</li>
-<li>Supports refactoring-safe Mock Objects: test code will not break at runtime when renaming methods or reordering method parameters
-</li>
-<li>Supports return values and exceptions.
-</li>
-<li>Supports checking the order of method calls, for one or more Mock Objects.
-</li>
-</ul>
-<h2>
-Requirements
-</h2>
-<ul>
-<li>EasyMock only works with Java 1.5.0 and above.</li>
-<li>cglib (2.2) and Objenesis (1.2) must be in the classpath to perform class mocking</li>
-</ul>
-<h2>
-Installation
-</h2>
-<h3>Using Maven</h3>
-EasyMock is available in the Maven central repository. Just add the following dependency to your pom.xml:
-<pre>
-    <dependency>
-      <groupId>org.easymock</groupId>
-      <artifactId>easymock</artifactId>
-      <version>3.2</version>
-      <scope>test</scope>
-    </dependency>
-</pre>
-You can obviously use any other dependency tool compatible with the Maven repository.
-
-<h3>Manually</h3>
-<ul>
-<li>Unzip the EasyMock zip file (<code>easymock-3.2.zip</code>).</li>
-<li>Go into the <code>easymock-3.2</code> directory.</li>
-<li>Add the EasyMock jar file (<code>easymock.jar</code>) to your classpath.</li>
-<li>To perform class mocking, also add <a href="http://www.objenesis.org">Objenesis</a> and <a href="http://cglib.sourceforge.net/">Cglib</a> to your classpath.</li>
-<li>The tests are in <code>easymock-3.2-tests.jar</code> and can be launched with a JUnit TestRunner 
-having JUnit 4.7 on top of EasyMock, cglib and Objenesis in your classpath.</li>
-<li>The source code of EasyMock is stored in <code>easymock-3.2-sources.jar</code>.</li>
-</ul>
-<h2>
-Usage
-</h2>
-<p>
-Most parts of a software system do not work in isolation, but collaborate
-with other parts to get their job done. In a lot of cases, we do not care
-about using collaborators in unit testing, as we trust these collaborators.
-If we <em>do</em> care about it, Mock Objects help us to test the unit under test
-in isolation. Mock Objects replace collaborators of the unit under
-test.
-</p>
-<p>
-The following examples use the interface <code>Collaborator</code>:
-</p>
-<pre>
-package org.easymock.samples;
-
-public interface Collaborator {
-    void documentAdded(String title);
-    void documentChanged(String title);
-    void documentRemoved(String title);
-    byte voteForRemoval(String title);
-    byte[] voteForRemovals(String[] title);
-}
-</pre>
-<p>
-Implementors of this interface are collaborators 
-(in this case listeners) of a class named <code>ClassUnderTest</code>:
-</p>
-<pre>
-public class ClassUnderTest {
-
-    private Collaborator listener;
-    // ...
-    public void setListener(Collaborator listener) {
-        this.listener = listener;
-    }
-    public void addDocument(String title, byte[] document) { 
-        // ... 
-    }
-    public boolean removeDocument(String title) {
-        // ... 
-    }
-    public boolean removeDocuments(String[] titles) {
-        // ... 
-    }
-}
-</pre>
-<p>
-The code for both the class and the interface may be found 
-in the package <code>org.easymock.samples</code> in <code>easymock-3.2-samples.jar</code>
-from the EasyMock zip delivery.
-</p>
-<p>
-The following examples assume that you are familiar with the JUnit testing framework.
-Although the tests shown here use JUnit 4, you may as well use JUnit 3 or TestNG.
-</p>
-<h3>
-The first Mock Object
-</h3>
-<p>
-We will now build a test case and toy around with it to understand the
-functionality of the EasyMock package. <code>easymock-3.2-samples.jar</code>
-contains a modified version of this test. Our first test should check
-whether the removal of a non-existing document does <strong>not </strong> lead to a notification
-of the collaborator. Here is the test without the definition of the
-Mock Object:
-</p>
-<pre>
-package org.easymock.samples;
-
-import org.junit.*;
-
-public class ExampleTest {
-
-    private ClassUnderTest classUnderTest;
-    private Collaborator mock;
-
-    @Before
-    public void setUp() {
-        classUnderTest = new ClassUnderTest();
-        classUnderTest.setListener(mock);
-    }
-
-    @Test
-    public void testRemoveNonExistingDocument() {    
-        // This call should not lead to any notification
-        // of the Mock Object: 
-        classUnderTest.removeDocument("Does not exist");
-    }
-}
-</pre>
-<p>
-For many tests using EasyMock, 
-we only need a static import of methods of <code>org.easymock.EasyMock</code>.
-</p>
-<pre>
-import static org.easymock.EasyMock.*;
-import org.junit.*;
-
-public class ExampleTest {
-
-    private ClassUnderTest classUnderTest;
-    private Collaborator mock;
-    
-}    
-</pre>
-<p>
-To get a Mock Object, we need to
-</p>
-<ol>
-<li>create a Mock Object for the interface we would like to simulate,
-</li>
-<li>record the expected behavior, and
-</li>
-<li>switch the Mock Object to replay state.
-</li>
-</ol>
-<p>
-Here is a first example:
-</p>
-<pre>
-    @Before
-    public void setUp() {
-        mock = createMock(Collaborator.class); // 1
-        classUnderTest = new ClassUnderTest();
-        classUnderTest.setListener(mock);
-    }
-
-    @Test
-    public void testRemoveNonExistingDocument() {
-        // 2 (we do not expect anything)
-        replay(mock); // 3
-        classUnderTest.removeDocument("Does not exist");
-    }
-</pre>
-<p>
-After activation in step 3, <code>mock</code>
-is a Mock Object for the <code>Collaborator</code>
-interface that expects no calls. This means that if we change
-our <code>ClassUnderTest</code> to call
-any of the interface's methods, the Mock Object will throw
-an <code>AssertionError</code>:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentRemoved("Does not exist"):
-    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-    at $Proxy0.documentRemoved(Unknown Source)
-    at org.easymock.samples.ClassUnderTest.notifyListenersDocumentRemoved(ClassUnderTest.java:74)
-    at org.easymock.samples.ClassUnderTest.removeDocument(ClassUnderTest.java:33)
-    at org.easymock.samples.ExampleTest.testRemoveNonExistingDocument(ExampleTest.java:24)
-    ...
-</pre>
-
-<h3>
-    Using annotations
-</h3>
-<p>
-Since EasyMock 3.2, it is now possible to create mocks using annotations. This is a nice and shorter way to create your
-mocks and inject them to the tested class. Here is the example above, now using annotations:
-</p>
-<pre>
-import static org.easymock.EasyMock.*;
-
-import org.easymock.EasyMockRunner;
-import org.easymock.TestSubject;
-import org.easymock.Mock;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
- at RunWith(EasyMockRunner.class)
-public class ExampleTest {
-
-    @TestSubject
-    private ClassUnderTest classUnderTest = new ClassUnderTest(); // 2
-
-    @Mock
-    private Collaborator mock; // 1
-
-    @Test
-    public void testRemoveNonExistingDocument() {
-        replay(mock);
-        classUnderTest.removeDocument("Does not exist");
-    }
-}
-</pre>
-<p>
-The <code>mock</code> is instantiated by the runner at step 1. It is then set by the runner, to the <code>listener</code>
-field on step 2. The <code>setUp</code> method can be removed since all the initialisation was done by the runner.
-</p>
-<h3>
-   Adding Behavior
-</h3>
-<p>
-Let us write a second test. If a document
-is added on the class under test, we expect a call to <code>mock.documentAdded()</code>
-on the Mock Object with the title of the document as argument:
-</p>
-<pre>
-    @Test
-    public void testAddDocument() {
-        mock.documentAdded("New Document"); // 2
-        replay(mock); // 3
-        classUnderTest.addDocument("New Document", new byte[0]); 
-    }
-</pre>
-<p>
-So in the record state (before calling <code>replay</code>),
-the Mock Object does <em>not</em> behave like a Mock Object,
-but it records method calls. After calling <code>replay</code>,
-it behaves like a Mock Object, checking whether the expected
-method calls are really done.
-</p>
-<p>
-If <code>classUnderTest.addDocument("New Document", new byte[0])</code>
-calls the expected method with a wrong argument, the Mock Object will complain
-with an <code>AssertionError</code>:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentAdded("Wrong title"):
-    documentAdded("New Document"): expected: 1, actual: 0
-    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-    at $Proxy0.documentAdded(Unknown Source)
-    at org.easymock.samples.ClassUnderTest.notifyListenersDocumentAdded(ClassUnderTest.java:61)
-    at org.easymock.samples.ClassUnderTest.addDocument(ClassUnderTest.java:28)
-    at org.easymock.samples.ExampleTest.testAddDocument(ExampleTest.java:30)
-    ...
-</pre>
-<p>
-All missed expectations are shown, as well as all fulfilled
-expectations for the unexpected call (none in this case). If the method
-call is executed too often, the Mock Object complains, too:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentAdded("New Document"):
-    documentAdded("New Document"): expected: 1, actual: 2
-    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-    at $Proxy0.documentAdded(Unknown Source)
-    at org.easymock.samples.ClassUnderTest.notifyListenersDocumentAdded(ClassUnderTest.java:62)
-    at org.easymock.samples.ClassUnderTest.addDocument(ClassUnderTest.java:29)
-    at org.easymock.samples.ExampleTest.testAddDocument(ExampleTest.java:30)
-    ...
-</pre>
-<h3>
-Verifying Behavior
-</h3>
-<p>
-There is one error that we have not handled so far: If we specify
-behavior, we would like to verify that it is actually used. The current
-test would pass if no method on the Mock Object is called. To verify that the
-specified behavior has been used, we have to call
-<code>verify(mock)</code>:
-</p>
-<pre>
-    @Test
-    public void testAddDocument() {
-        mock.documentAdded("New Document"); // 2 
-        replay(mock); // 3
-        classUnderTest.addDocument("New Document", new byte[0]);
-        verify(mock);
-    }
-</pre>
-<p>
-If the method is not called on the Mock Object, we now get the 
-following exception:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Expectation failure on verify:
-    documentAdded("New Document"): expected: 1, actual: 0
-    at org.easymock.internal.MocksControl.verify(MocksControl.java:70)
-    at org.easymock.EasyMock.verify(EasyMock.java:536)
-    at org.easymock.samples.ExampleTest.testAddDocument(ExampleTest.java:31)
-    ...
-</pre>
-<p>
-The message of the exception lists all missed expectations.
-</p>
-<h3>
-Expecting an Explicit Number of Calls
-</h3>
-<p>
-Up to now, our test has only considered a single method call. The next
-test should check whether the addition of an already existing
-document leads to a call to <code>mock.documentChanged()</code>
-with the appropriate argument. To be sure, we check this three
-times (hey, it is an example ;-)):
-</p>
-<pre>
-    @Test
-    public void testAddAndChangeDocument() {
-        mock.documentAdded("Document");
-        mock.documentChanged("Document");
-        mock.documentChanged("Document");
-        mock.documentChanged("Document");
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        verify(mock);
-    }
-</pre>
-<p>
-To avoid the repetition of <code>mock.documentChanged("Document")</code>,
-EasyMock provides a shortcut. We may specify the call count with the method
-<code>times(int times)</code> on the object returned by 
-<code>expectLastCall()</code>. The code then looks like:
-</p>
-<pre>
-    @Test
-    public void testAddAndChangeDocument() {
-        mock.documentAdded("Document");
-        mock.documentChanged("Document");
-        expectLastCall().times(3);
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        verify(mock);
-    }
-</pre>
-<p>
-If the method is called too often, we get an exception that
-tells us that the method has been called too many times.
-The failure occurs immediately at the first method call
-exceeding the limit:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentChanged("Document"):
-    documentChanged("Document"): expected: 3, actual: 4
-	at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-	at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-	at $Proxy0.documentChanged(Unknown Source)
-	at org.easymock.samples.ClassUnderTest.notifyListenersDocumentChanged(ClassUnderTest.java:67)
-	at org.easymock.samples.ClassUnderTest.addDocument(ClassUnderTest.java:26)
-	at org.easymock.samples.ExampleTest.testAddAndChangeDocument(ExampleTest.java:43)
-    ...
-</pre>
-<p>
-If there are too few calls, <code>verify(mock)</code> 
-throws an <code>AssertionError</code>:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Expectation failure on verify:
-    documentChanged("Document"): expected: 3, actual: 2
-	at org.easymock.internal.MocksControl.verify(MocksControl.java:70)
-	at org.easymock.EasyMock.verify(EasyMock.java:536)
-	at org.easymock.samples.ExampleTest.testAddAndChangeDocument(ExampleTest.java:43)
-    ...
-</pre>
-<h3>
-Specifying Return Values
-</h3>
-<p>
-For specifying return values, 
-we wrap the expected call in <code>expect(T value)</code> and specify the return value
-with the method <code>andReturn(Object returnValue)</code> on the object returned by
-<code>expect(T value)</code>.
-</p>
-<p>
-As an example, we check the workflow for document
-removal. If <code>ClassUnderTest</code> gets a call for document
-removal, it asks all collaborators for their vote for removal
-with calls to <code>byte voteForRemoval(String title)</code> value.
-Positive return values are a vote for
-removal. If the sum of all values is positive, the document is removed
-and <code>documentRemoved(String title)</code> is called on
-all collaborators:
-</p>
-<pre>
-    @Test
-    public void testVoteForRemoval() {
-        mock.documentAdded("Document");   // expect document addition
-        // expect to be asked to vote for document removal, and vote for it
-        expect(mock.voteForRemoval("Document")).andReturn((byte) 42);
-        mock.documentRemoved("Document"); // expect document removal
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        assertTrue(classUnderTest.removeDocument("Document"));
-        verify(mock);
-    }
-
-    @Test
-    public void testVoteAgainstRemoval() {
-        mock.documentAdded("Document");   // expect document addition
-        // expect to be asked to vote for document removal, and vote against it
-        expect(mock.voteForRemoval("Document")).andReturn((byte) -42);
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        assertFalse(classUnderTest.removeDocument("Document"));
-        verify(mock);
-    }
-</pre>
-<p>
-The type of the returned value is checked at compile time. As an example,
-the following code will not compile, as the type of the provided return value
-does not match the method's return value:
-</p>
-<pre>
-    expect(mock.voteForRemoval("Document")).andReturn("wrong type");
-</pre>
-<p>
-Instead of calling <code>expect(T value)</code>
-to retrieve the object for setting the return value, 
-we may also use the object returned by <code>expectLastCall()</code>.
-Instead of 
-</p>
-<pre>
-    expect(mock.voteForRemoval("Document")).andReturn((byte) 42);
-</pre>
-<p>
-we may use
-</p>
-<pre>
-    mock.voteForRemoval("Document");
-    expectLastCall().andReturn((byte) 42);
-</pre>
-<p>
-This type of specification should only be used if the line gets too long, 
-as it does not support type checking at compile time. 
-</p>
-<h3>
-Working with Exceptions
-</h3>
-<p>
-For specifying exceptions (more exactly: Throwables) to be thrown, the object returned by
-<code>expectLastCall()</code> and <code>expect(T value)</code> provides the method
-<code>andThrow(Throwable throwable)</code>.
-The method has to be called in record state after the call to the Mock Object for 
-which it specifies the <code>Throwable</code> to be thrown.
-</p>
-<p>
-Unchecked exceptions (that is, <code>RuntimeException</code>, <code>Error</code>
-and all their subclasses) can be thrown from every method. Checked exceptions can only be
-thrown from the methods that do actually throw them.
-</p>
-<h3>
-Creating Return Values or Exceptions
-</h3>
-<p>
-Sometimes we would like our mock object to return a value or throw an exception
-that is created at the time of the actual call. Since EasyMock 2.2, the object returned by
-<code>expectLastCall()</code> and <code>expect(T value)</code> provides the method
-<code>andAnswer(IAnswer answer)</code> which allows to specify an implementation of the
-interface <code>IAnswer</code> that is used to create the return value or exception.
-</p>
-<p>
-Inside an <code>IAnswer</code> callback, the arguments passed to the mock call 
-are available via <code>EasyMock.getCurrentArguments()</code>.
-If you use these, refactorings like reordering parameters may break your tests. 
-You have been warned.
-</p>
-<p>
-An alternative to <code>IAnswer</code> are the <code>andDelegateTo</code> and 
-<code>andStubDelegateTo</code> methods. They allow to delegate the call to a
-concrete implementation of the mocked interface that will then provide the answer. 
-The pros are that the arguments found in <code>EasyMock.getCurrentArguments()</code> 
-for <code>IAnswer</code> are now passed to the method of the concrete implementation. 
-This is refactoring safe. The cons are that you have to provide an implementation 
-which is kind of doing a mock manually... Which is what you try to avoid by 
-using EasyMock. It can also be painful if the interface has many methods. Finally, 
-the type of the concrete class can't be checked statically against the mock type. 
-If for some reason, the concrete class isn't implementing the method that is 
-delegated, you will get an exception during the replay only. However, this 
-case should be quite rare.  
-</p>
-<p>
-To understand correctly the two options, here is an example:
-</p>
-<pre>
-    List<String> l = createMock(List.class);
-
-    // andAnswer style
-    expect(l.remove(10)).andAnswer(new IAnswer<String>() {
-        public String answer() throws Throwable {
-            return getCurrentArguments()[0].toString();
-        }
-    });
-
-    // andDelegateTo style
-    expect(l.remove(10)).andDelegateTo(new ArrayList<String>() {
-        @Override
-        public String remove(int index) {
-            return Integer.toString(index);
-        }
-    });
-</pre>
-<h3>
-Changing Behavior for the Same Method Call
-</h3>
-<p>
-It is also possible to specify a changing behavior for a method.
-The methods <code>times</code>, <code>andReturn</code>, and <code>andThrow</code>
-may be chained. As an example, we define <code>voteForRemoval("Document")</code> to
-</p>
-<ul>
-<li>return 42 for the first three calls,
-</li>
-<li>throw a <code>RuntimeException</code> for the next four calls,
-</li>
-<li>return -42 once.
-</li>
-</ul>
-<pre>
-    expect(mock.voteForRemoval("Document"))
-        .andReturn((byte) 42).times(3)
-        .andThrow(new RuntimeException(), 4)
-        .andReturn((byte) -42);
-</pre>
-<h3>
-Relaxing Call Counts
-</h3>
-<p>
-To relax the expected call counts, there are additional methods
-that may be used instead of <code>times(int count)</code>:
-</p>
-<dl>
-<dt><code>times(int min, int max)</code></dt> 
-<dd>to expect between <code>min</code> and <code>max</code> calls,</dd>
-<dt><code>atLeastOnce()</code></dt>
-<dd>to expect at least one call, and</dd>
-<dt><code>anyTimes()</code></dt>
-<dd>to expected an unrestricted number of calls.</dd>
-</dl>
-<p>
-If no call count is specified, one call is expected. If we would like to state this
-explicitely, <code>once()</code> or <code>times(1)</code> may be used.
-</p>
-<h3>
-Strict Mocks
-</h3>
-<p>
-On a Mock Object returned by a <code>EasyMock.createMock()</code>,
-the order of method calls is not checked.
-If you would like a strict Mock Object that checks the order of method calls,
-use <code>EasyMock.create<i>Strict</i>Mock()</code> to create it.</p>
-<p>
-If an unexpected method is called on a strict Mock Object,
-the message of the exception will show the method calls
-expected at this point followed by the first conflicting one. 
-<code>verify(mock)</code> shows all missing method calls.
-</p>
-<h3>
-Switching Order Checking On and Off
-</h3>
-<p>
-Sometimes, it is necessary to have a Mock Object that checks the order of only some calls.
-In record phase, you may switch order checking on by calling <code>checkOrder(mock, true)</code>
-and switch it off by calling <code>checkOrder(mock, false)</code>.
-</p>
-<p>
-There are two differences between a strict Mock Object and a normal Mock Object:
-</p>
-<ol>
-	<li> A strict Mock Object has order checking enabled after creation. </li>
-	<li> A strict Mock Object has order checking enabled after reset (see <em>Reusing a Mock Object</em>). </li>
-</ol>
-<h3>
-Flexible Expectations with Argument Matchers
-</h3>
-<p>
-To match an actual method call on the Mock Object with an 
-expectation, <code>Object</code> arguments are by default compared with
-<code>equals()</code>. This may lead to problems. As an example,
-we consider the following expectation:
-</p>
-<pre>
-String[] documents = new String[] { "Document 1", "Document 2" };
-expect(mock.voteForRemovals(documents)).andReturn(42);
-</pre>
-<p>
-If the method is called with another array with the same contents,
-we get an exception, as <code>equals()</code> compares object
-identity for arrays: 
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call voteForRemovals([Ljava.lang.String;@9a029e):
-    voteForRemovals([Ljava.lang.String;@2db19d): expected: 1, actual: 0
-    documentRemoved("Document 1"): expected: 1, actual: 0
-    documentRemoved("Document 2"): expected: 1, actual: 0
-	at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-	at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-	at $Proxy0.voteForRemovals(Unknown Source)
-	at org.easymock.samples.ClassUnderTest.listenersAllowRemovals(ClassUnderTest.java:88)
-	at org.easymock.samples.ClassUnderTest.removeDocuments(ClassUnderTest.java:48)
-	at org.easymock.samples.ExampleTest.testVoteForRemovals(ExampleTest.java:83)
-    ...
-</pre>
-<p>
-To specify that only array equality is needed for this call, we may use the method
-<code>aryEq</code> that is statically imported from the <code>EasyMock</code> class:
-</p>
-<pre>
-String[] documents = new String[] { "Document 1", "Document 2" };
-expect(mock.voteForRemovals(aryEq(documents))).andReturn(42);
-</pre>
-<p>
-If you would like to use matchers in a call, you have to specify matchers for all
-arguments of the method call. 
-</p>
-<p>
-There are a couple of predefined argument matchers available.
-</p>
-<dl>
-
-<dt><code>eq(X value)</code></dt>
-<dd>Matches if the actual value is equals the expected value. Available for all primitive types and for objects.</dd>
-
-<dt><code>anyBoolean()</code>, <code>anyByte()</code>, <code>anyChar()</code>, <code>anyDouble()</code>, <code>anyFloat()</code>, <code>anyInt()</code>, <code>anyLong()</code>, <code>anyObject()</code>, <code>anyObject(Class clazz)</code>, <code>anyShort()</code>, <code>anyString()</code></dt>
-<dd>Matches any value. Available for all primitive types and for objects.</dd>
-
-<dt><code>eq(X value, X delta)</code></dt>
-<dd>Matches if the actual value is equal to the given value allowing the given delta. Available for <code>float</code> and <code>double</code>.</dd>
-
-<dt><code>aryEq(X value)</code></dt>
-<dd>Matches if the actual value is equal to the given value according to <code>Arrays.equals()</code>. Available for primitive and object arrays.</dd>
-
-<dt><code>isNull()</code>, <code>isNull(Class clazz)</code></dt>
-<dd>Matches if the actual value is null. Available for objects.</dd>
-
-<dt><code>notNull()</code>, <code>notNull(Class clazz)</code></dt>
-<dd>Matches if the actual value is not null. Available for objects.</dd>
-
-<dt><code>same(X value)</code></dt>
-<dd>Matches if the actual value is the same as the given value. Available for objects.</dd>
-
-<dt><code>isA(Class clazz)</code></dt>
-<dd>Matches if the actual value is an instance of the given class, or if it is in instance of a class that extends or implements the given class. Null always return false. Available for objects.</dd>
-
-<dt><code>lt(X value)</code>, <code>leq(X value)</code>, <code>geq(X value)</code>, <code>gt(X value)</code></dt>
-<dd>Matches if the actual value is less/less or equal/greater or equal/greater than the given value. Available for all numeric primitive types and <code>Comparable</code>.</dd>
-
-<dt><code>startsWith(String prefix), contains(String substring), endsWith(String suffix)</code></dt>
-<dd>Matches if the actual value starts with/contains/ends with the given value. Available for <code>String</code>s.</dd>
-
-<dt><code>matches(String regex), find(String regex)</code></dt>
-<dd>Matches if the actual value/a substring of the actual value matches the given regular expression. Available for <code>String</code>s.</dd>
-
-<dt><code>and(X first, X second)</code></dt>
-<dd>Matches if the matchers used in <code>first</code> and <code>second</code> both match. Available for all primitive types and for objects.</dd>
-
-<dt><code>or(X first, X second)</code></dt>
-<dd>Matches if one of the matchers used in <code>first</code> and <code>second</code> match. Available for all primitive types and for objects.</dd>
-
-<dt><code>not(X value)</code></dt>
-<dd>Matches if the matcher used in <code>value</code> does not match.</dd>
-
-<dt><code>cmpEq(X value)</code></dt>
-<dd>Matches if the actual value is equals according to <code>Comparable.compareTo(X o)</code>. Available for all numeric primitive types and <code>Comparable</code>.</dd>
-
-<dt><code>cmp(X value, Comparator<X> comparator, LogicalOperator operator)</code></dt>
-<dd>Matches if <code>comparator.compare(actual, value) operator 0</code> where the operator is <,<=,>,>= or ==. Available for objects.</dd>
-
-<dt><code>capture(Capture<T> capture)</code>, <code>captureXXX(Capture<T> capture)</code></dt>
-<dd>Matches any value but captures it in the <code>Capture</code> parameter for later access. You can do <code>and(someMatcher(...), capture(c))</code> to 
-capture a parameter from a specific call to the method. You can also specify a <code>CaptureType</code> telling that a given <code>Capture</code> should keep 
-the first, the last, all or no captured values.</dd>
-
-</dl>
-
-<h3>
-Defining your own Argument Matchers
-</h3>
-<p>
-Sometimes it is desirable to define own argument matchers. Let's say that an
-argument matcher is needed that matches an exception if the given exception has the same type and an equal message.
-It should be used this way:
-</p>
-<pre>
-    IllegalStateException e = new IllegalStateException("Operation not allowed.")
-    expect(mock.logThrowable(eqException(e))).andReturn(true);
-</pre>
-<p>
-Two steps are necessary to achieve this: The new argument matcher has to be defined,
-and the static method <code>eqException</code> has to be declared.
-</p>
-<p>
-To define the new argument matcher, we implement the interface <code>org.easymock.IArgumentMatcher</code>.
-This interface contains two methods: <code>matches(Object actual)</code> checks whether the actual argument
-matches the given argument, and <code>appendTo(StringBuffer buffer)</code> appends a string representation
-of the argument matcher to the given string buffer. The implementation is straightforward:
-</p>
-<pre>
-import org.easymock.IArgumentMatcher;
-
-public class ThrowableEquals implements IArgumentMatcher {
-    private Throwable expected;
-
-    public ThrowableEquals(Throwable expected) {
-        this.expected = expected;
-    }
-
-    public boolean matches(Object actual) {
-        if (!(actual instanceof Throwable)) {
-            return false;
-        }
-        String actualMessage = ((Throwable) actual).getMessage();
-        return expected.getClass().equals(actual.getClass())
-                && expected.getMessage().equals(actualMessage);
-    }
-
-    public void appendTo(StringBuffer buffer) {
-        buffer.append("eqException(");
-        buffer.append(expected.getClass().getName());
-        buffer.append(" with message \"");
-        buffer.append(expected.getMessage());
-        buffer.append("\"")");
-
-    }
-}
-</pre>
-<p>
-The method <code>eqException</code> must create the argument matcher with the given Throwable,
-report it to EasyMock via the static method <code>reportMatcher(IArgumentMatcher matcher)</code>, 
-and return a value so that it may be used inside the call 
-(typically <code>0</code>, <code>null</code> or <code>false</code>). A first attempt may look like:
-</p>
-<pre>
-public static Throwable eqException(Throwable in) {
-    EasyMock.reportMatcher(new ThrowableEquals(in));
-    return null;
-}
-</pre>
-<p>
-However, this only works if the method <code>logThrowable</code> in the example usage accepts 
-<code>Throwable</code>s, and does not require something more specific like a <code>RuntimeException</code>.
-In the latter case, our code sample would not compile:
-</p>
-<pre>
-    IllegalStateException e = new IllegalStateException("Operation not allowed.")
-    expect(mock.logThrowable(eqException(e))).andReturn(true);
-</pre>
-<p>
-Java 5.0 to the rescue: Instead of defining <code>eqException</code> with a <code>Throwable</code> as
-parameter and return value, we use a generic type that extends <code>Throwable</code>: 
-</p>
-<pre>
-public static <T extends Throwable> T eqException(T in) {
-    reportMatcher(new ThrowableEquals(in));
-    return null;
-}
-</pre>
-<h3>
-Reusing a Mock Object
-</h3>
-<p>
-Mock Objects may be reset by <code>reset(mock)</code>.
-</p>
-<p>
-If needed, a mock can also be converted from one type to another by calling <code>resetToNice(mock)</code>, 
-<code>resetToDefault(mock)</code> ou <code>resetToStrict(mock)</code>.
-</p>
-<h3>
-Using Stub Behavior for Methods
-</h3>
-<p>
-Sometimes, we would like our Mock Object to respond to some method calls, but we do not want to
-check how often they are called, when they are called, or even if they are called at all.
-This stub behavoir may be defined by using the methods <code>andStubReturn(Object value)</code>, 
-<code>andStubThrow(Throwable throwable)</code>, <code>andStubAnswer(IAnswer<Tgt; answer)</code>
-and <code>asStub()</code>. The following code 
-configures the MockObject to answer 42 to <code>voteForRemoval("Document")</code> once
-and -1 for all other arguments:
-</p>
-<pre>
-    expect(mock.voteForRemoval("Document")).andReturn(42);
-    expect(mock.voteForRemoval(not(eq("Document")))).andStubReturn(-1);
-</pre>
-<h3>
-Nice Mocks
-</h3>
-<p>
-On a Mock Object returned by <code>createMock()</code> the default behavior for all methods is to throw an 
-<code>AssertionError</code> for all unexpected method calls.
-If you would like a "nice" Mock Object that by default allows all method calls and returns
-appropriate empty values (<code>0</code>, <code>null</code> or <code>false</code>), use <code>create<i>Nice</i>Mock()</code> instead.
-</p>
-
-<a id="Object_Methods"/><h3>Object Methods</h3>
-<p>
-The behavior for the four Object methods <code>equals()</code>,
-<code>hashCode()</code>, <code>toString()</code> and <code>finalize()</code>
-cannot be changed for Mock Objects created with EasyMock,
-even if they are part of the interface for which the
-Mock Object is created.
-</p>
-<h3>Checking Method Call Order Between Mocks</h3>
-<p>
-Up to this point, we have seen a mock object as a single object that is configured by static methods
-on the class <code>EasyMock</code>. But many of these static methods just identify the hidden control of the Mock Object
-and delegate to it. A Mock Control is an object implementing the <code>IMocksControl</code> interface. 
-</p>
-<p>
-So instead of
-</p>
-<pre>
-    IMyInterface mock = createStrictMock(IMyInterface.class);
-    replay(mock);
-    verify(mock); 
-    reset(mock);
-</pre>
-<p>
-we may use the equivalent code:
-</p>
-<pre>
-    IMocksControl ctrl = createStrictControl();
-    IMyInterface mock = ctrl.createMock(IMyInterface.class);
-    ctrl.replay();
-    ctrl.verify(); 
-    ctrl.reset();
-</pre>
-<p>
-The IMocksControl allows to create more than one Mock Object, and so it is possible to check the order of method calls
-between mocks. As an example, we set up two mock objects for the interface <code>IMyInterface</code>, and we expect the calls
-<code>mock1.a()</code> and <code>mock2.a()</code> ordered, then an open number of calls to <code>mock1.c()</code> 
-and <code>mock2.c()</code>, and finally <code>mock2.b()</code> and <code>mock1.b()</code>, in this order:
-</p>
-<pre>
-    IMocksControl ctrl = createStrictControl();
-    IMyInterface mock1 = ctrl.createMock(IMyInterface.class);
-    IMyInterface mock2 = ctrl.createMock(IMyInterface.class);
-
-    mock1.a();
-    mock2.a();
-
-    ctrl.checkOrder(false);
-
-    mock1.c();
-    expectLastCall().anyTimes();     
-    mock2.c();
-    expectLastCall().anyTimes();     
-
-    ctrl.checkOrder(true);
-
-    mock2.b();
-    mock1.b();
-
-    ctrl.replay();
-</pre>
-<h3>Naming Mock Objects</h3>
-<p>
-Mock Objects can be named at creation using 
-<code>createMock(String name, Class<T> toMock)</code>,
-<code>createStrictMock(String name, Class<T> toMock)</code> or
-<code>createNiceMock(String name, Class<T> toMock)</code>.
-The names will be shown in exception failures.
-</p>
-<h3>Serializing Mocks</h3>
-<p>
-Mocks can be serialized at any time during their life. However, there are some obvious contraints:
-</p>
-<ul>
-<li>All used matchers should be serializable (all genuine EasyMock ones are)
-</li>
-<li>Recorded parameters should also be serializable
-</li>
-</ul>
-<h3>Multithreading</h3>
-<p>
-During recording, a mock is <b>not</b> thread-safe. So a giving mock (or mocks linked to the same <code>IMocksControl</code>)
-can only be recorded  from a single thread. However, different mocks can be recorded simultaneously in different threads.
-</p>
-<p>
-During the replay phase, mocks are by default thread-safe. This can be change for a given mock if <code>makeThreadSafe(mock, false)</code>
-is called during the recording phase. This can prevent deadlocks in some rare situations.
-</p>
-<p>
-Finally, calling <code>checkIsUsedInOneThread(mock, true)</code> on a mock will make sure the mock is used in only one thread and
-throw an exception otherwise. This can be handy to make sure a thread-unsafe mocked object is used correctly.
-</p>
-<h3>EasyMockSupport</h3>
-<p>
-<code>EasyMockSupport</code> is a class that meant to be used as a helper or base class to your test cases. It will automatically registers all 
-created mocks (or in fact all created controls) and to replay, reset or verify them in batch instead of explicitly. Here's a JUnit example:
-</p>
-<pre>
-public class SupportTest extends EasyMockSupport {
-
-    private Collaborator firstCollaborator;
-    private Collaborator secondCollaborator;
-    private ClassTested classUnderTest;
-
-    @Before
-    public void setup() {
-        classUnderTest = new ClassTested();
-    }
-
-    @Test
-    public void addDocument() {
-        // creation phase
-        firstCollaborator = createMock(Collaborator.class);
-        secondCollaborator = createMock(Collaborator.class);
-        classUnderTest.addListener(firstCollaborator);
-        classUnderTest.addListener(secondCollaborator);
-
-        // recording phase
-        firstCollaborator.documentAdded("New Document");
-        secondCollaborator.documentAdded("New Document");
-        
-        replayAll(); // replay all mocks at once
-        
-        // test
-        classUnderTest.addDocument("New Document", new byte[0]);
-                
-        verifyAll(); // verify all mocks at once
-    }
-}
-</pre>
-<h3>Altering EasyMock default behavior</h3>
-<p>
-EasyMock provides a property mecanisim allowing to alter its behavior. It mainly aims
-at allowing to use a legacy behavior on a new version. Currently supported properties are:
-</p>
-<dl>
-<dt><code>easymock.notThreadSafeByDefault</code></dt>
-<dd>If true, a mock won't be thread-safe by default. Possible values are "true" or "false". Default is false</dd>
-<dt><code>easymock.enableThreadSafetyCheckByDefault</code></dt>
-<dd>If true, thread-safety check feature will be on by default. Possible values are "true" or "false". Default is false</dd>
-<dt><code>easymock.disableClassMocking</code></dt>
-<dd>Do not allow class mocking (only allow interface mocking). Possible values are "true" or "false". Default is false.</dd>
-</dl>
-<p>
-Properties can be set in two ways.
-</p>
-<ul>
-<li>In an <code>easymock.properties</code> file set in the classpath default package 
-</li>
-<li>By calling <code>EasyMock.setEasyMockProperty</code>. Constants are available 
-in the <code>EasyMock</code> class. Setting properties in the code obviously override any property set
-in <code>easymock.properties</code>
-</li>
-</ul>
-<h3>Backward Compatibility</h3>
-<p>EasyMock 3 still has a Class Extension project (although deprecated) to
-allow an easier migration from EasyMock 2 to EasyMock 3. It is a source not a binary 
-compatibility. So the code will need to be recompiled.
-</p>
-<p>EasyMock 2.1 introduced a callback feature that has been removed in EasyMock 2.2,
-as it was too complex. Since EasyMock 2.2, the <code>IAnswer</code> interface
-provides the functionality for callbacks. 
-</p>
-<h3>OSGi</h3>
-<p>
-EasyMock jar can be used as an OSGi bundle. It exports <code>org.easymock</code>, 
-<code>org.easymock.internal</code> and <code>org.easymock.internal.matchers</code>
-packages. However, to import the two latter, you need to specify the <code>poweruser</code>
-attribute at true (<code>poweruser=true</code>). These packages are meant to be
-used to extend EasyMock so they usually don't need to be imported.
-</p>
-<h3>Partial mocking</h3>  
-<p>
-Sometimes you may need to mock only some methods of a class and keep
-the normal behavior of others. This usually happens when you want to
-test a method that calls some others in the same class. So you want to
-keep the normal behavior of the tested method and mock the others.
-</p>
-<p>
-In this case, the first thing to do is to consider a refactoring since
-most of the time this problem caused by a bad design. If it's not
-the case or if you can't do otherwise because of some development constraints,
-here's the solution.
-</p>
-<pre>
-ToMock mock = createMockBuilder(ToMock.class)
-   .addMockedMethod("mockedMethod").createMock();
-</pre>
-<p>In this case only the methods added with <code>addMockedMethod(s)</code> will be 
-mocked (<code>mockedMethod()</code> in the example). The others will still 
-behave as they used to. One exception: abstract methods are conveniently mocked by default.
-</p>
-<p><code>createMockBuilder</code> returns a <code>IMockBuilder</code> interface. It contains various methods to
-easily create a partial mock. Have a look at the javadoc.
-</p>
-<p>
-<b>Remark:</b> EasyMock provides a default behavior for Object's methods (<i>equals, hashCode, toString, finalize</i>).
-However, for a partial mock, if these methods are not mocked explicitly, they will have their normal behavior
-instead of EasyMock default's one.
-</p>
-<h3>Self testing</h3>  
-<p>
-It is possible to create a mock by calling one of its constructor. This can be handy when a
-class method needs to be tested but the class other methods, mocked. For that you should do
-something like
-</p>
-<pre>
-ToMock mock = createMockBuilder(ToMock.class)
-   .withConstructor(1, 2, 3); // 1, 2, 3 are the constructor parameters
-</pre>
-<p>
-See the <code>ConstructorCalledMockTest</code> for an example.
-</p>
-<h3>Replace default class instantiator</h3>
-<p>
-For some reason (usually an unsupported JVM), it is possible that EasyMock isn't able to mock
-a class mock in your environment. Under the hood, class instantiation is implemented with a factory
-pattern. In case of failure, you can replace the default instantiator with:
-</p>
-<ul>
-<li>The good old <code>DefaultClassInstantiator</code> which works well with Serializable classes
-and otherwise tries to guess the best constructor and parameters to use.</li>
-<li>You own instantiator which only needs to implement <code>IClassInstantiator</code>.</li>
-</ul>
-<p>
-You set this new instantiator using <code>ClassInstantiatorFactory.setInstantiator()</code>.
-You can set back the default one with <code>setDefaultInstantiator()</code>.
-</p>
-<p>
-<b>Important:</b>
-The instantiator is kept statically so it will stick between your unit tests. Make sure you
-reset it if needed.
-</p>
-<h3>Serialize a class mock</h3>
-<p>
-A class mock can also be serialized. However, since it extends a serializable class, this class
-might have defined a special behavior using for instance <code>writeObject</code>. These methods
-will still be called when serializing the mock and might fail. The workaround is usually to call
-a constructor when creating the mock.
-</p>
-<p>
-Also, de-serializing the mock in a different class loader than the serialization might fail. It wasn't tested.
-</p>
-<h3>Class Mocking Limitations</h3>
-<ul> 
-<li>To be coherent with interface mocking, EasyMock provides a built-in behavior 
-for <code>equals()</code>, <code>toString()</code>, <code>hashCode()</code> and <code>finalize()</code> 
-even for class mocking. It means that you cannot record your own behavior for 
-these methods. This limitation is considered to be a feature
-that prevents you from having to care about these methods.
-</li>
-<li>Final methods cannot be mocked. If called, their normal code will be executed.
-</li>
-<li>Private methods cannot be mocked. If called, their normal code will be executed. 
-During partial mocking, if your method under test is calling some private methods, 
-you will need to test them as well since you cannot mock them.
-</li>
-<li>Class instantiation is performed using 
-<a href="http://objenesis.googlecode.com/svn/docs/index.html">Objenesis</a>.
-Supported JVMs are listed 
-<a href="http://code.google.com/p/objenesis/wiki/ListOfCurrentlySupportedVMs">here</a>.
-</li>
-</ul>
-<h3>Android support</h3>
-<p>
-Since EasyMock 3.2, EasyMock can be used on Android VM (Dalvik). Just add a dependency to you apk project used to test 
-your application. It is a good idea to exclude cglib since dexmaker is used instead. You should also add dexmaker
-explicitly because it's an optional dependency. If you use Maven, the final required dependencies will look like this
-</p>
-<pre>
-<dependency>
-  <groupId>org.easymock</groupId>
-  <artifactId>easymock</artifactId>
-  <version>3.2</version>
-  <exclusions>
-    <exclusion>
-      <groupId>cglib</groupId>
-      <artifactId>cglib-nodep</artifactId>
-    </exclusion>
-  </exclusions>
-</dependency>
-<dependency>
-  <groupId>com.google.dexmaker</groupId>
-  <artifactId>dexmaker</artifactId>
-  <version>1.0</version>
-</dependency>    
-</pre>   
-<h2>
-EasyMock Development
-</h2>
-<p>
-EasyMock has been developed by Tammo Freese at OFFIS. It is maintained by Henri Tremblay 
-since 2007. The development of EasyMock is hosted on <a href="http://sourceforge.net/projects/easymock/">SourceForge</a> 
-to allow other developers and companies to contribute.
-</p>
-<p>
-Class mocking (previously known as EasyMock Class Extension) was initially developed 
-by Joel Shellman, Chad Woolley and Henri Tremblay on the files section of Yahoo!Groups.
-</p>
-<p>
-Thanks to the people who gave feedback or provided patches, including
-Nascif Abousalh-Neto, Dave Astels, Francois Beausoleil, George Dinwiddie, Shane Duan, 
-Wolfgang Frech, Steve Freeman, Oren Gross, John D. Heintz, Dale King, Brian Knorr,
-Dierk Koenig, Chris Kreussling, Robert Leftwich, Patrick Lightbody, Johannes Link, 
-Rex Madden, David McIntosh, Karsten Menne, Bill Michell,
-Stephan Mikaty, Ivan Moore, Ilja Preuss, Justin Sampson, Markus Schmidlin, Richard Scott,
-Joel Shellman, Jiří Mareš, Alexandre de Pellegrin
-Shaun Smith, Marco Struck, Ralf Stuckert, Victor Szathmary, Bill Uetrecht,
-Frank Westphal, Chad Woolley, Bernd Worsch, 
-Rodrigo Damazio, Bruno Fonseca, Ben Hutchison and numerous others.
-</p>
-<p>
-Please check the <a href="http://www.easymock.org">EasyMock home page</a> for new versions,
-and send bug reports and suggestions to the
-<a href="mailto:easymock at yahoogroups.com?subject=EasyMock ${project.version} feedback">EasyMock Yahoo!Group</a>.
-If you would like to subscribe to the EasyMock Yahoo!Group, send a message to
-<a href="mailto:easymock-subscribe at yahoogroups.com">easymock-subscribe at yahoogroups.com</a>.
-</p>
-</div>
-</body>
-</html>
diff --git a/Documentation_fr.html b/Documentation_fr.html
deleted file mode 100644
index 2494d97..0000000
--- a/Documentation_fr.html
+++ /dev/null
@@ -1,1251 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
-
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />	
-<title>EasyMock 3.2 Readme</title>
-<link rel="stylesheet" href="easymock.css" />
-</head>
-<body><div class="bodywidth">
-
-<h2>EasyMock 3.2 Readme</h2>
- 
-<p>Documentation de la version 3.2 (2013-07-11)<br />
-© 2001-2013 <a href="http://www.offis.de">OFFIS</a>, <a href="http://tammofreese.de">Tammo Freese</a>, <a href="http://henritremblay.blogspot.fr/">Henri Tremblay</a>.
-</p>
-<p><i>Documentation traduite originellement de l'anglais par <a href="http://alexdp.free.fr">Alexandre de Pellegrin</a>.
-Maintenue par Henri Tremblay.</i>
-</p>
-<p>
-EasyMock est une librairie fournissant un moyen simple d'utiliser des Mock Objects pour
-une interface ou classe donnée. EasyMock est disponible sous <a href="http://www.apache.org/licenses/LICENSE-2.0.txt">license Apache 2</a>.
-</p>
-<p>
-Les Mock Objects simulent le comportement du code
-métier et sont capables de vérifier s'il est utilisé
-comme prévu.
-Les classes métier peuvent être testées
-de façon isolée en simulant leurs objets
-liés par des Mock Objects.
-</p>
-<p>
-Écrire et maintenir des Mock Objects est souvent une
-tâche pénible et source d'erreurs. EasyMock génère les
-Mock Objects dynamiquement - pas besoin de les écrire, pas
-de code généré!
-</p>
-<h3>
-Avantages d'EasyMock
-</h3>
-<ul>
-<li>Pas d'écriture manuelle des Mock Objects.
-</li>
-<li>Supporte le refactoring sur les Mock Objects : le code de test ne sera pas cassé au runtime lors du renommage de
-    méthodes ou de la réorganisations de paramètres
-</li>
-<li>Supporte les valeurs de retour et les exceptions.
-</li>
-<li>Supporte la vérification de l'ordre d'appel des méthodes, sur un ou plusieurs Mock Objects.
-</li>
-</ul>
-<h2>
-Environnement Requis
-</h2>
-<ul>
-<li>EasyMock 2 fonctionne uniquement avec Java 1.5.0 ou supérieur.</li>
-<li>cglib (2.2) and Objenesis (1.2) doivent être présent dans le classpath pour faire du mocking de classes</li>
-</ul>
-<h2>
-Installation
-</h2>
-<h3>Avec Maven</h3>
-EasyMock est disponible dans le référentiel central de Maven. Ajoutez la dépendance 
-suivante à votre pom.xml:
-<pre>
-    <dependency>
-      <groupId>org.easymock</groupId>
-      <artifactId>easymock</artifactId>
-      <version>3.2</version>
-      <scope>test</scope>
-    </dependency>
-</pre>
-Vous pouvez, bien évidemment, n'importe quel outil de gestion de dépendances compatible
-avec le référentiel Maven.
-<h3>Manuellement</h3>
-<ul>
-<li>Décompressez le fichier zip d'EasyMock (<code>easymock-3.2.zip</code>).</li>
-<li>Allez dans le répertoire <code>easymock-3.2</code>.</li>
-<li>Ajoutez le jar d'EasyMock (<code>easymock.jar</code>) à votre classpath.</li>
-<li>Pour pouvoir mocker des classes, ajoutez aussi <a href="http://www.objenesis.org">Objenesis</a> et <a href="http://cglib.sourceforge.net/">Cglib</a> à votre classpath.</li>
-<li>Les tests sont dans <code>easymock-3.2-tests.jar</code> et peuvent être lancés à l'aide d'un JUnit TestRunner 
-en ayant JUnit 4.7, EasyMock, cglib et Objenesis dans votre classpath.</li>
-<li>Le code source d'EasyMock est situé dans <code>easymock-3.2-sources.jar</code>.</li>
-</ul>
-<h2>
-Utilisation
-</h2>
-<p>
-La plupart des éléments d'un logiciel ne fonctionnent
-pas de manière isolée mais en collaboration avec
-d'autres éléments (objets liés) pour effectuer leur
-tâche.
-Dans beaucoup de cas, nous ne nous soucions pas d'utiliser des objets
-liés pour nos tests unitaires du moment
-que nous avons confiance en eux. Si
-ce n'est pas le cas, les Mock Objects peuvent nous aider à
-tester unitairement de façon isolée. Les Mock Objects
-remplacent les objets liés de l'élément testé.
-</p>
-<p>
-Les exemples suivants utilisent l'interface <code>Collaborator</code>:
-</p>
-<pre>
-package org.easymock.samples;
-
-public interface Collaborator {
-    void documentAdded(String title);
-    void documentChanged(String title);
-    void documentRemoved(String title);
-    byte voteForRemoval(String title);
-    byte[] voteForRemovals(String[] title);
-}
-</pre>
-<p>
-Les implémentations de cette interface sont des
-objets liés (des listeners dans ce cas) à la classe nommée <code>ClassUnderTest</code>:
-</p>
-<pre>
-public class ClassUnderTest {
-
-    private Collaborator listener;
-    // ...
-    public void setListener(Collaborator listener) {
-        this.listener = listener;
-    }
-    public void addDocument(String title, byte[] document) { 
-        // ... 
-    }
-    public boolean removeDocument(String title) {
-        // ... 
-    }
-    public boolean removeDocuments(String[] titles) {
-        // ... 
-    }
-}
-</pre>
-<p>
-Le code de la classe et de l'interface est disponible dans
-le package <code>org.easymock.samples</code> dans <code>easymock-3.2-samples.jar</code>
-inclue dans la livraison d'EasyMock.
-</p>
-<p>
-Les exemples qui suivent supposent que vous êtes familier avec le framework de test JUnit.
-Bien que les tests montrés ici utilisent JUnit 4, vous pouvez également utiliser JUnit 3 ou TestNG.
-</p>
-<h3>
-Votre premier Mock Object
-</h3>
-<p>
-Nous allons maintenant construire un cas de test et jouer avec pour
-comprendre les fonctionnalités du package EasyMock. Le
-fichier <code>easymock-3.2-samples.jar</code> contient une version modifiée de ce test. 
-Notre premier test devra vérifier que la suppression d'un document non existant <strong>ne doit pas</strong>
-provoquer la notification de l'objet lié. Voici le test dans la définition du Mock Object:
-</p>
-<pre>
-package org.easymock.samples;
-
-import org.junit.*;
-
-public class ExampleTest {
-
-    private ClassUnderTest classUnderTest;
-    private Collaborator mock;
-
-    @Before
-    public void setUp() {
-        classUnderTest = new ClassUnderTest();
-        classUnderTest.setListener(mock);
-    }
-
-    @Test
-    public void testRemoveNonExistingDocument() {    
-        // This call should not lead to any notification
-        // of the Mock Object: 
-        classUnderTest.removeDocument("Does not exist");
-    }
-}
-</pre>
-<p>
-Pour beaucoup de tests utilisant EasyMock, nous avons
-uniquement besoin de l'import statique des méthodes de la classe
-<code>org.easymock.EasyMock</code>.
-Cette classe est la seule non interne et non dépréciée d'EasyMock 2.
-</p>
-<pre>
-import static org.easymock.EasyMock.*;
-import org.junit.*;
-
-public class ExampleTest {
-
-    private ClassUnderTest classUnderTest;
-    private Collaborator mock;
-    
-}    
-</pre>
-<p>
-Pour obtenir un Mock Object, il faut:
-</p>
-<ol>
-<li>créer un Mock Object pour l'interface à simuler,
-</li>
-<li>enregistrer le comportement attendu, puis
-</li>
-<li>basculer le Mock Object à l'état 'replay'.
-</li>
-</ol>
-<p>
-Voici le premier exemple:
-</p>
-<pre>
-    @Before
-    public void setUp() {
-        mock = createMock(Collaborator.class); // 1
-        classUnderTest = new ClassUnderTest();
-        classUnderTest.addListener(mock);
-    }
-
-    @Test
-    public void testRemoveNonExistingDocument() {
-        // 2 (we do not expect anything)
-        replay(mock); // 3
-        classUnderTest.removeDocument("Does not exist");
-    }
-</pre>
-<p>
-Après activation à l'étape 3, <code>mock</code> 
-est un Mock Object de l'interface <code>Collaborator</code>
-qui n'attend aucun appel. Cela signifie que si nous changeons notre <code>ClassUnderTest</code> 
-pour appeler n'importe quelle méthode de l'interface, le Mock Object lèvera 
-une <code>AssertionError</code>:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentRemoved("Does not exist"):
-    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-    at $Proxy0.documentRemoved(Unknown Source)
-    at org.easymock.samples.ClassUnderTest.notifyListenersDocumentRemoved(ClassUnderTest.java:74)
-    at org.easymock.samples.ClassUnderTest.removeDocument(ClassUnderTest.java:33)
-    at org.easymock.samples.ExampleTest.testRemoveNonExistingDocument(ExampleTest.java:24)
-    ...
-</pre>
-
-<h3>
-    Utiliser les annotations
-</h3>
-<p>
-Depuis EasyMock 3.2, il est maintenant possible de créer un Mock Object à l'aide d'annotations. C'est une méthode
-à la fois simple et rapide pour créer vos Mock Objects et les injecter à la classe testée. Reprenons l'exemple
-ci-dessus en utilisant les annotations:
-</p>
-<pre>
-import static org.easymock.EasyMock.*;
-
-import org.easymock.EasyMockRunner;
-import org.easymock.TestSubject;
-import org.easymock.Mock;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
- at RunWith(EasyMockRunner.class)
-public class ExampleTest {
-
-    @TestSubject
-    private ClassUnderTest classUnderTest = new ClassUnderTest(); // 2
-
-    @Mock
-    private Collaborator mock; // 1
-
-    @Test
-    public void testRemoveNonExistingDocument() {
-        replay(mock);
-        classUnderTest.removeDocument("Does not exist");
-    }
-}
-</pre>
-<p>
-Le <code>mock</code> est instancié par le runner à l'étape 1. Il est ensuite assigné, toujours par le runner,
-au champs <code>listener</code> de <code>classUnderTest</code> à l'étape 2. La méthode <code>setUp</code> n'est
-donc plus nécessaire étant donné que toute l'initialisation a déjà été effectuée par le runner.
-</p>
-<h3>
-   Ajouter un comportement
-</h3>
-<p>
-Écrivons un second test. Si un document est ajouté à
-la classe testée, nous nous attendons à un appel à
-<code>mock.documentAdded()</code>
-sur le Mock Object avec le titre du document en argument:
-</p>
-<pre>
-    @Test
-    public void testAddDocument() {
-        mock.documentAdded("New Document"); // 2
-        replay(mock); // 3
-        classUnderTest.addDocument("New Document", new byte[0]); 
-    }
-</pre>
-<p>
-Aussi, dans l'étape d'enregistrement (avant d'appeler <code>replay</code>),
-le Mock Object ne se comporte pas comme<em></em> un Mock Object mais enregistre 
-les appels de méthode. Après l'appel à <code>replay</code>,
-il se comporte comme un Mock Object, vérifiant que les appels 
-de méthode attendus ont bien lieu.
-</p>
-<p>
-Si <code>classUnderTest.addDocument("New Document", new byte[0])</code>
-appelle la méthode attendue avec un mauvais argument, le
-Mock Object lèvera une <code>AssertionError</code>:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentAdded("Wrong title"):
-    documentAdded("New Document"): expected: 1, actual: 0
-    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-    at $Proxy0.documentAdded(Unknown Source)
-    at org.easymock.samples.ClassUnderTest.notifyListenersDocumentAdded(ClassUnderTest.java:61)
-    at org.easymock.samples.ClassUnderTest.addDocument(ClassUnderTest.java:28)
-    at org.easymock.samples.ExampleTest.testAddDocument(ExampleTest.java:30)
-    ...
-</pre>
-<p>
-Tous les appels attendus n'ayant pas eu lieu sont montrés, ainsi
-que tous les appels faits alors qu'ils étaient non attendus
-(aucun dans notre cas). Si l'appel à la méthode est
-effectué trop de fois, le Mock Object le signale
-également:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentAdded("New Document"):
-    documentAdded("New Document"): expected: 1, actual: 2
-    at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-    at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-    at $Proxy0.documentAdded(Unknown Source)
-    at org.easymock.samples.ClassUnderTest.notifyListenersDocumentAdded(ClassUnderTest.java:62)
-    at org.easymock.samples.ClassUnderTest.addDocument(ClassUnderTest.java:29)
-    at org.easymock.samples.ExampleTest.testAddDocument(ExampleTest.java:30)
-    ...
-</pre>
-<h3>
-Vérifier le comportement
-</h3>
-<p>
-Il y a un type d'erreur dont nous ne nous sommes pas
-préoccupés jusqu'à présent: si nous décrivons un
-comportement, nous voulons vérifier qu'il est bien respecté. 
-Le test qui suit passe si une méthode du Mock Object est appelée. 
-Pour vérifier cela, nous devons appeler <code>verify(mock)</code>:
-</p>
-<pre>
-    @Test
-    public void testAddDocument() {
-        mock.documentAdded("New Document"); // 2 
-        replay(mock); // 3
-        classUnderTest.addDocument("New Document", new byte[0]);
-        verify(mock);
-    }
-</pre>
-<p>
-Si la méthode du Mock Object n'est pas appelée, 
-l'exception suivante sera levée :
-</p>
-<pre>
-java.lang.AssertionError: 
-  Expectation failure on verify:
-    documentAdded("New Document"): expected: 1, actual: 0
-    at org.easymock.internal.MocksControl.verify(MocksControl.java:70)
-    at org.easymock.EasyMock.verify(EasyMock.java:536)
-    at org.easymock.samples.ExampleTest.testAddDocument(ExampleTest.java:31)
-    ...
-</pre>
-<p>
-Le message de l'exception liste tous les appels attendus qui n'ont pas eu lieu.
-</p>
-<h3>
-Attendre un nombre explicite d'appels
-</h3>
-<p>
-Jusqu'à maintenant, nos tests ont été faits uniquement
-sur un seul appel de méthode. Le test suivant
-vérifiera que l'ajout d'un document déjà existant
-déclenche l'appel à <code>mock.documentChanged()</code>
-avec l'argument approprié. Pour en être certain, nous
-vérifions cela trois fois (après tout, c'est un exemple
-;-)):
-</p>
-<pre>
-    @Test
-    public void testAddAndChangeDocument() {
-        mock.documentAdded("Document");
-        mock.documentChanged("Document");
-        mock.documentChanged("Document");
-        mock.documentChanged("Document");
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        verify(mock);
-    }
-</pre>
-<p>
-Afin d'éviter la répétition de <code>mock.documentChanged("Document")</code>,
-EasyMock fournit un raccourci. Nous pouvons spécifier le nombre d'appel avec la méthode
-<code>times(int times)</code> sur l'objet retourné par <code>expectLastCall()</code>.
-Le code ressemble alors à cela:
-</p>
-<pre>
-    @Test
-    public void testAddAndChangeDocument() {
-        mock.documentAdded("Document");
-        mock.documentChanged("Document");
-        expectLastCall().times(3);
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        verify(mock);
-    }
-</pre>
-<p>
-Si la méthode est appelée un trop grand nombre de fois,
-une exception sera levée nous indiquant que la méthode a
-été appelée trop de fois.
-L'erreur est levée immédiatement après le premier
-appel dépassant la limite:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call documentChanged("Document"):
-    documentChanged("Document"): expected: 3, actual: 4
-	at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-	at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-	at $Proxy0.documentChanged(Unknown Source)
-	at org.easymock.samples.ClassUnderTest.notifyListenersDocumentChanged(ClassUnderTest.java:67)
-	at org.easymock.samples.ClassUnderTest.addDocument(ClassUnderTest.java:26)
-	at org.easymock.samples.ExampleTest.testAddAndChangeDocument(ExampleTest.java:43)
-    ...
-</pre>
-<p>
-S'il y a trop peu d'appels, <code>verify(mock)</code>
-lève une <code>AssertionError</code>:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Expectation failure on verify:
-    documentChanged("Document"): expected: 3, actual: 2
-	at org.easymock.internal.MocksControl.verify(MocksControl.java:70)
-	at org.easymock.EasyMock.verify(EasyMock.java:536)
-	at org.easymock.samples.ExampleTest.testAddAndChangeDocument(ExampleTest.java:43)
-    ...
-</pre>
-<h3>
-Spécifier des valeurs de retour
-</h3>
-<p>
-Pour spécifier des valeurs de retour, nous encapsulons l'appel attendu dans
-<code>expect(T value)</code> et spécifions la valeur de retour avec la 
-méthode <code>andReturn(Object returnValue)</code> sur l'objet retourné par
-<code>expect(T value)</code>.
-</p>
-<p>
-Prenons par exemple la vérification du workflow lors de la suppression d'un document. 
-Si <code>ClassUnderTest</code> fait un appel pour supprimer un document, 
-il doit demander aux objets liés de voter pour cette suppression 
-par appel à <code>byte voteForRemoval(String title)</code>.
-Une réponse positive approuve la suppression. Si la somme de
-toutes les réponses est positive, alors le document est
-supprimé et l'appel à <code>documentRemoved(String title)</code> 
-est effectué sur les objets liés:
-</p>
-<pre>
-    @Test
-    public void testVoteForRemoval() {
-        mock.documentAdded("Document");   // expect document addition
-        // expect to be asked to vote for document removal, and vote for it
-        expect(mock.voteForRemoval("Document")).andReturn((byte) 42);
-        mock.documentRemoved("Document"); // expect document removal
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        assertTrue(classUnderTest.removeDocument("Document"));
-        verify(mock);
-    }
-
-    @Test
-    public void testVoteAgainstRemoval() {
-        mock.documentAdded("Document");   // expect document addition
-        // expect to be asked to vote for document removal, and vote against it
-        expect(mock.voteForRemoval("Document")).andReturn((byte) -42);
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        assertFalse(classUnderTest.removeDocument("Document"));
-        verify(mock);
-    }
-</pre>
-<p>
-Le type de la valeur de retour est vérifié à la
-compilation. Par exemple, le code suivant ne compilera pas du fait que
-le type fourni ne correspond au type retourné par la
-méthode:
-</p>
-<pre>
-    expect(mock.voteForRemoval("Document")).andReturn("wrong type");
-</pre>
-<p>
-Au lieu d'appeler <code>expect(T value)</code> pour
-récupérer l'objet auquel affecter une valeur de retour, 
-nous pouvons aussi utiliser l'objet retourné par <code>expectLastCall()</code>.
-Ainsi, au lieu de 
-</p>
-<pre>
-    expect(mock.voteForRemoval("Document")).andReturn((byte) 42);
-</pre>
-<p>
-nous pouvons écrire
-</p>
-<pre>
-    mock.voteForRemoval("Document");
-    expectLastCall().andReturn((byte) 42);
-</pre>
-<p>
-Ce type d'écriture doit uniquement être utilisé
-si la ligne est trop longue car il n'inclut pas la vérification
-du type à la compilation.
-</p>
-<h3>
-Travailler avec les exceptions
-</h3>
-<p>
-Afin de spécifier les exceptions (plus précisément:
-les Throwables) devant être levées, l'objet
-retourné par <code>expectLastCall()</code> et <code>expect(T value)</code> 
-fournit la méthode <code>andThrow(Throwable throwable)</code>.
-Cette méthode doit être appelée durant l'étape
-d'enregistrement après l'appel au Mock Object pour lequel le <code>Throwable</code>
-doit être levé.
-</p>
-<p>
-Les exception non "checkées" (comme <code>RuntimeException</code>,
-<code>Error</code> ainsi que toutes leurs sous classes) peuvent
-être levées de n'importe quelle méthode. Les
-exceptions "checkées" ne doivent être levées que 
-pour méthodes où cela est prévu.
-</p>
-<h3>
-Créer des valeurs de retour ou des exceptions
-</h3>
-<p>
-Parfois, nous voulons que notre Mock Object retourne une valeur ou
-lève une exception créée au moment de l'appel.
-Depuis la version 2.2 d'EasyMock, l'objet retourné 
-par <code>expectLastCall()</code> et <code>expect(T value)</code> fournit la méthode
-<code>andAnswer(IAnswer answer)</code> permettant de spécifier une implémentation 
-de l'interface <code>IAnswer</code> utilisée pour créer 
-une valeur de retour ou une exception.
-</p>
-<p>
-Au sein d'<code>IAnswer</code>, les arguments passés lors de l'appel au mock sont 
-disponibles via <code>EasyMock.getCurrentArguments()</code>.
-Si vous utilisez cela, les refactorings du type réorganisation
-de l'ordre des arguments briseront vos tests. Vous êtes prévenu.
-</p>
-<p>
-Une alternative à <code>IAnswer</code> sont les méthodes <code>andDelegateTo</code> et 
-<code>andStubDelegateTo</code>. Elles permettent de déléguer un appel à une
-implémentation concrète de l'interface "mockées" et qui fournira la valeur de retour. 
-L'avantage est que les paramètres normalement récupéré avec <code>EasyMock.getCurrentArguments()</code> 
-pour <code>IAnswer</code> sont maintenant passés à la méthode de l'implémentation concrète. 
-Ça supporte donc le refactoring. Le désavantage est qu'il faut fournir une implémentation... 
-ce qui resemble un peu à faire un mock à la main. Ce que vous tentez d'éviter en utilisant 
-EasyMock. Il peut aussi être pénible d'implémenter l'interface si celle-ci à beaucoup de méthodes. Finalement, 
-le type de l'implémentation ne peut être vérifié statiquement par rapport au type du Mock Object. 
-Si pour une quelconque raison, la class concrète n'implémente plus la méthode sur laquelle est 
-délégué l'appel, vous aurez une exception lors de la phase de "replay". Ce cas devrait toutefois
-être assez rare.  
-</p>
-<p>
-Pour bien comprendre les deux options, voici un exemple:
-</p>
-<pre>
-    List<String> l = createMock(List.class);
-
-    // andAnswer style
-    expect(l.remove(10)).andAnswer(new IAnswer<String>() {
-        public String answer() throws Throwable {
-            return getCurrentArguments()[0].toString();
-        }
-    });
-
-    // andDelegateTo style
-    expect(l.remove(10)).andDelegateTo(new ArrayList<String>() {
-        @Override
-        public String remove(int index) {
-            return Integer.toString(index);
-        }
-    });
-</pre>
-<h3>
-Changer de comportement sur le même appel de méthode
-</h3>
-<p>
-Il est également possible de spécifier un changement de comportement pour une méthode.
-Les méthodes <code>times</code>, <code>andReturn</code> et <code>andThrow</code>
-peuvent être chaînées. Comme exemple, 
-nous définissons <code>voteForRemoval("Document")</code> pour
-</p>
-<ul>
-<li>retourner 42 pour les trois premiers appels,
-</li>
-<li>lever une <code>RuntimeException</code> sur le quatrième appel,
-</li>
-<li>renvoyer -42 une fois.
-</li>
-</ul>
-<pre>
-    expect(mock.voteForRemoval("Document"))
-        .andReturn((byte) 42).times(3)
-        .andThrow(new RuntimeException(), 4)
-        .andReturn((byte) -42);
-</pre>
-<h3>
-Être plus permissif sur le nombre d'appels
-</h3>
-<p>
-Afin d'être plus permissif sur le nombre d'appels attendus,
-des méthodes additionnelles peuvent être
-utilisées à la place de <code>times(int count)</code>:
-</p>
-<dl>
-<dt><code>times(int min, int max)</code></dt> 
-<dd>pour attendre entre <code>min</code> and <code>max</code> appels,</dd>
-<dt><code>atLeastOnce()</code></dt>
-<dd>pour attendre au moins un appel, et</dd>
-<dt><code>anyTimes()</code></dt>
-<dd>pour attendre une quantité non définie d'appels.</dd>
-</dl>
-<p>
-Si aucun nombre d'appels n'est explicitement défini,
-alors seul un appel est attendu. Pour le définir explicitement,
-vous pouvez utiliser <code>once()</code> ou <code>times(1)</code>.
-</p>
-<h3>
-Mocks stricts
-</h3>
-<p>
-Sur un Mock Object retourné par <code>EasyMock.createMock()</code>,
-l'ordre d'appel des méthodes n'est pas vérifié.
-Si vous souhaitez avoir un Mock Object 'strict' vérifiant cet ordre,
-utilisez <code>EasyMock.create<i>Strict</i>Mock()</code>.</p>
-<p>
-Lorsqu'un appel inattendu à une méthode est fait sur
-un Mock Object 'strict', le message de l'exception contient les appels 
-de méthode attendus à ce moment, suivi du premier appel en
-conflit. <code>verify(mock)</code> montre tous les appels de méthode manqués.
-</p>
-<h3>
-Activer/Désactiver la vérification de l'ordre d'appel des méthodes
-</h3>
-<p>
-Il est parfois nécessaire qu'un Mock Object vérifie
-l'ordre d'appel sur certains appels uniquement. Pendant la phase
-d'enregistrement, vous pouvez activer la vérification de l'ordre
-d'appel en utilisant <code>checkOrder(mock, true)</code> et la 
-désactiver en utilisant <code>checkOrder(mock, false)</code>.
-</p>
-<p>
-Il y a deux différences entre un Mock Object 'strict' et un Mock Object 'normal':
-</p>
-<ol>
-	<li> Un mock 'strict' a la vérification de l'ordre d'appel activé à la création. </li>
-	<li> Un mock 'strict' a la vérification de l'ordre d'appel activé après un reset (voir <em>Réutilisation d'un Mock Object</em>). </li>
-</ol>
-<h3>
-Définir des comparateurs d'arguments pour plus de souplesse
-</h3>
-<p>
-Pour vérifier la correspondance à un appel de méthode prévu sur un Mock Object, 
-les arguments<code> de type Object</code> sont comparés, par défaut, avec
-<code>equals()</code>. Cela peut introduire des problèmes. Considérons l'exemple suivant:
-</p>
-<pre>
-String[] documents = new String[] { "Document 1", "Document 2" };
-expect(mock.voteForRemovals(documents)).andReturn(42);
-</pre>
-<p>
-Si la méthode est appelée avec un autre tableau ayant le même contenu,
-cela provoque une exception du fait que <code>equals()</code> compare l'identité 
-des objets pour les tableaux:
-</p>
-<pre>
-java.lang.AssertionError: 
-  Unexpected method call voteForRemovals([Ljava.lang.String;@9a029e):
-    voteForRemovals([Ljava.lang.String;@2db19d): expected: 1, actual: 0
-    documentRemoved("Document 1"): expected: 1, actual: 0
-    documentRemoved("Document 2"): expected: 1, actual: 0
-	at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:29)
-	at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:44)
-	at $Proxy0.voteForRemovals(Unknown Source)
-	at org.easymock.samples.ClassUnderTest.listenersAllowRemovals(ClassUnderTest.java:88)
-	at org.easymock.samples.ClassUnderTest.removeDocuments(ClassUnderTest.java:48)
-	at org.easymock.samples.ExampleTest.testVoteForRemovals(ExampleTest.java:83)
-    ...
-</pre>
-<p>
-Pour spécifier que seule l'égalité de tableau
-est nécessaire pour cet appel, utilisez la méthode 
-<code>aryEq</code>, importée statiquement de la classe <code>EasyMock</code>:
-</p>
-<pre>
-String[] documents = new String[] { "Document 1", "Document 2" };
-expect(mock.voteForRemovals(aryEq(documents))).andReturn(42);
-</pre>
-<p>
-Si vous souhaitez utiliser les comparateurs lors d'un appel, vous devez
-en utiliser pour chaque argument de la méthode appelée.
-</p>
-<p>
-Voici quelques comparateurs prédéfinis disponible:
-</p>
-<dl>
-
-<dt><code>eq(X value)</code></dt>
-<dd>Vérifie que la valeur reçue égale la valeur attendue. Disponible pour tous les types primitifs et objets.</dd>
-
-<dt><code>anyBoolean()</code>, <code>anyByte()</code>, <code>anyChar()</code>, <code>anyDouble()</code>, <code>anyFloat()</code>, <code>anyInt()</code>, <code>anyLong()</code>, <code>anyObject()</code>, <code>anyObject(Class clazz)</code>, <code>anyShort()</code>, <code>anyString()</code></dt>
-<dd>Laisse passer n'importe quelle valeur. Disponible pour tous les types primitifs et objets.</dd>
-
-<dt><code>eq(X value, X delta)</code></dt>
-<dd>Vérifie que la valeur reçue égale la valeur attendue, plus ou moins un delta. Disponible pour les <code>float</code> et <code>double</code>.</dd>
-
-<dt><code>aryEq(X value)</code></dt>
-<dd>Vérifie que la valeur reçue égale la valeur attendue en s'appuyant sur <code>Arrays.equals()</code>. Disponible pour les tableaux d'objets et de types primitifs.</dd>
-
-<dt><code>isNull()</code>, <code>isNull(Class clazz)</code></dt>
-<dd>Vérifie que la valeur reçue est nulle. Disponible pour les objets.</dd>
-
-<dt><code>notNull()</code>, <code>notNull(Class clazz)</code></dt>
-<dd>Vérifie que la valeur reçue n'est pas nulle. Disponible pour les objets.</dd>
-
-<dt><code>same(X value)</code></dt>
-<dd>Vérifie que la valeur reçue est la même que la value attendue. Disponible pour les objets.</dd>
-
-<dt><code>isA(Class clazz)</code></dt>
-<dd>Vérifie que la valeur reçue est une instance de clazz ou d'une classe hérite ou implémente clazz. Disponible pour les objets.</dd>
-
-<dt><code>lt(X value)</code>, <code>leq(X value)</code>, <code>geq(X value)</code>, <code>gt(X value)</code></dt>
-<dd>Vérifie que la valeur reçue est inférieure/inférieure ou égale/supérieure
-ou égale/supérieure à la valeur attendue. Disponible pour tous les types primitifs numériques et les implémentations de <code>Comparable</code>.</dd>
-
-<dt><code>startsWith(String prefix), contains(String substring), endsWith(String suffix)</code></dt>
-<dd>Vérifie que la valeur reçue commence par/contient/se termine par la valeur attendue. Disponible pour les <code>String</code>s.</dd>
-
-<dt><code>matches(String regex), find(String regex)</code></dt>
-<dd>Vérifie que la valeur reçue/une sous-chaîne de la valeur reçue correspond à l'expression ré. Disponible pour les <code>String</code>s.</dd>
-
-<dt><code>and(X first, X second)</code></dt>
-<dd>Est valide si les résultats des deux comparateurs utilisés en <code>first</code> et <code>second</code> sont vérifiés. Disponible pour tous les types primitifs et objets.</dd>
-
-<dt><code>or(X first, X second)</code></dt>
-<dd>Est valide si l'un des résultats des deux comparateurs utilisés en <code>first</code> et <code>second</code> est vérifié. Disponible pour tous les types primitifs et objets.</dd>
-
-<dt><code>not(X value)</code></dt>
-<dd>Est valide si le résultat du comparateur utilisé dans <code>value</code> est négatif.</dd>
-
-<dt><code>cmpEq(X value)</code></dt>
-<dd>Vérifie que la valeur reçue égale la valeur attendue du point de vue de <code>Comparable.compareTo(X o)</code>. Disponible pour tous les types primitifs numériques et les implémentations de <code>Comparable</code>.</dd>
-
-<dt><code>cmp(X value, Comparator<X> comparator, LogicalOperator operator)</code></dt>
-<dd>Vérifie que <code>comparator.compare(reçue, value) operator 0</code> où <code>operator</code> est <,<=,>,>= ou ==.</dd>
-
-<dt><code>capture(Capture<T> capture)</code>, <code>captureXXX(Capture<T> capture)</code></dt>
-<dd>Laisse passer n'importe quelle valeur mais la capture dans le paramètre <code>Capture</code> pour un usage ultérieurs. Vous pouvez utiliser <code>and(someMatcher(...), capture(c))</code> pour 
-capturer le paramètre d'un appel de méthode en particulier. Vous pouvez aussi spécifier le <code>CaptureType</code> pour indiquer à l'objet
-<code>Capture</code> de conserver le premier (<code>FIRST</code>), le dernier (<code>LAST</code>), tous (<code>ALL</code>) ou aucun (<code>NONE</code>) des objets capturés</dd>
-
-</dl>
-
-<h3>
-Définir son propre comparateur d'arguments
-</h3>
-<p>
-Il peut être intéressant de définir son propre
-comparateur d'argument. Prenons un comparateur dont le rôle
-serait de vérifier une exception par rapport à son
-type et message. Il pourrait être utilisé de la façon suivante:
-</p>
-<pre>
-    IllegalStateException e = new IllegalStateException("Operation not allowed.")
-    expect(mock.logThrowable(eqException(e))).andReturn(true);
-</pre>
-<p>
-Deux étapes sont nécessaires pour réaliser cela: le nouveau comparateur
-doit être défini et la méthode statique <code>eqException</code> 
-doit être déclarée.
-</p>
-<p>
-Pour définir le nouveau comparateur d'argument, nous implémentons l'interface <code>org.easymock.IArgumentMatcher</code>.
-Cette interface contient deux méthodes: <code>matches(Object actual)</code>, vérifiant 
-que l'argument reçu est bien celui attendu, et <code>appendTo(StringBuffer buffer)</code>,
-ajoutant au StringBuffer une chaîne de caractères représentative du comparateur d'argument.
-L'implémentation est la suivante :
-</p>
-<pre>
-import org.easymock.IArgumentMatcher;
-
-public class ThrowableEquals implements IArgumentMatcher {
-    private Throwable expected;
-
-    public ThrowableEquals(Throwable expected) {
-        this.expected = expected;
-    }
-
-    public boolean matches(Object actual) {
-        if (!(actual instanceof Throwable)) {
-            return false;
-        }
-        String actualMessage = ((Throwable) actual).getMessage();
-        return expected.getClass().equals(actual.getClass())
-                && expected.getMessage().equals(actualMessage);
-    }
-
-    public void appendTo(StringBuffer buffer) {
-        buffer.append("eqException(");
-        buffer.append(expected.getClass().getName());
-        buffer.append(" with message \"");
-        buffer.append(expected.getMessage());
-        buffer.append("\"")");
-
-    }
-}
-</pre>
-<p>
-La méthode <code>eqException</code> doit instancier le
-comparateur d'argument avec l'objet Throwable donné, le fournir
-à EasyMock via la méthode statique <code>reportMatcher(IArgumentMatcher matcher)</code>
-et retourner une valeur afin d'être utilisée au sein de l'appel à la méthode mockée 
-(typiquement <code>0</code>, <code>null</code> ou <code>false</code>). Une première tentative ressemblerait à ceci:
-</p>
-<pre>
-public static Throwable eqException(Throwable in) {
-    EasyMock.reportMatcher(new ThrowableEquals(in));
-    return null;
-}
-</pre>
-<p>
-Cependant, cela ne fonctionnerait que si la méthode <code>logThrowable</code>
-de l'exemple acceptait <code>Throwable</code>s et quelque chose de plus spécifique du style de <code>RuntimeException</code>. 
-Dans ce dernier cas, le code de notre exemple ne compilerait pas:
-</p>
-<pre>
-    IllegalStateException e = new IllegalStateException("Operation not allowed.")
-    expect(mock.logThrowable(eqException(e))).andReturn(true);
-</pre>
-<p>
-Java 5.0 à la rescousse: Au lieu de définir <code>eqException</code>
-avec un <code>Throwable</code> en paramètre, nous utilisons un type générique 
-qui hérite de <code>Throwable</code>:
-</p>
-<pre>
-public static <T extends Throwable> T eqException(T in) {
-    reportMatcher(new ThrowableEquals(in));
-    return null;
-}
-</pre>
-<h3>
-Réutilisation d'un Mock Object
-</h3>
-<p>
-Les Mock Objects peuvent être réinitialisés avec <code>reset(mock)</code>.
-</p>
-<p>
-Au besoin, un Mock Object peut aussi être converti d'un type à l'autre en appelant <code>resetToNice(mock)</code>, 
-<code>resetToDefault(mock)</code> ou <code>resetToStrict(mock)</code>.
-</p>
-<h3>
-Utilisation d'un comportement de "stub" pour les méthodes
-</h3>
-<p>
-Dans certains cas, nous voudrions que nos Mock Object répondent
-à certains appels, mais sans tenir compte du nombre de fois, de l'ordre
-ni même s'ils ont été eu lieu.
-Ce comportement de "stub" peut être défini en utilisant
-les méthodes <code>andStubReturn(Object value)</code>, 
-<code>andStubThrow(Throwable throwable)</code>, <code>andStubAnswer(IAnswer<t> answer)</code>
-et <code>asStub()</code>. Le code suivant configure le Mock Object pour répondre 42 
-à <code>voteForRemoval("Document")</code> une fois et -1 pour tous les autres arguments:
-</p>
-<pre>
-    expect(mock.voteForRemoval("Document")).andReturn(42);
-    expect(mock.voteForRemoval(not(eq("Document")))).andStubReturn(-1);
-</pre>
-<h3>
-Création de mocks dits "gentils"
-</h3>
-<p>
-Pour un Mock Object retourné par <code>createMock()</code>, le comportement par défaut pour toutes 
-les méthodes est de lever une <code>AssertionError</code> pour tous les appels non prévus.
-Si vous souhaitez avoir un Mock Object "gentil" autorisant, par défaut, l'appel à 
-toutes les méthodes et retournant la valeur vide appropriée (<code>0</code>, <code>null</code>
-ou <code>false</code>), utilisez <code>create<i>Nice</i>Mock()</code> au lieu de <code>createMock()</code>.
-</p>
-
-<a id="Object_Methods"/><h3>Méthodes de la classe Object</h3>
-<p>
-Les comportements des quatre méthodes <code>equals()</code>,
-<code>hashCode()</code>, <code>toString()</code> et <code>finalize()</code>
-ne peuvent être changés sur des Mock Objects créés avec EasyMock,
-même si elles font partie de l'interface duquel le Mock Object est créé.
-</p>
-<h3>Vérifier l'ordre d'appel des méthodes entre plusieurs Mocks</h3>
-<p>
-Jusqu'à présent, nous avons vu un Mock Object comme étant
-seul et configuré par les méthodes statiques de la classe <code>EasyMock</code>. 
-Mais beaucoup de ces méthodes statiques font référence à l'objet "control"
-caché de chaque Mock Object et lui délègue l'appel. Un
-Mock Control est un objet implémentant l'interface <code>IMocksControl</code>.
-</p>
-<p>
-Du coup, au lieu de
-</p>
-<pre>
-    IMyInterface mock = createStrictMock(IMyInterface.class);
-    replay(mock);
-    verify(mock); 
-    reset(mock);
-</pre>
-<p>
-nous pourrions utiliser le code équivalent:
-</p>
-<pre>
-    IMocksControl ctrl = createStrictControl();
-    IMyInterface mock = ctrl.createMock(IMyInterface.class);
-    ctrl.replay();
-    ctrl.verify(); 
-    ctrl.reset();
-</pre>
-<p>
-L'interface <code>IMocksControl</code> permet de créer plus d'un seul Mock Object. 
-Ainsi, il est possible de vérifier l'ordre d'appel des méthodes entre les mocks. 
-Par exemple, configurons deux mock objects pour l'interface <code>IMyInterface</code> pour lesquels 
-nous attendons respectivement les appels à <code>mock1.a()</code> et <code>mock2.a()</code>, 
-un nombre indéfini d'appels à <code>mock1.c()</code> et <code>mock2.c()</code>, 
-et enfin <code>mock2.b()</code> et <code>mock1.b()</code>, dans cet ordre:
-</p>
-<pre>
-    IMocksControl ctrl = createStrictControl();
-    IMyInterface mock1 = ctrl.createMock(IMyInterface.class);
-    IMyInterface mock2 = ctrl.createMock(IMyInterface.class);
-
-    mock1.a();
-    mock2.a();
-
-    ctrl.checkOrder(false);
-
-    mock1.c();
-    expectLastCall().anyTimes();     
-    mock2.c();
-    expectLastCall().anyTimes();     
-
-    ctrl.checkOrder(true);
-
-    mock2.b();
-    mock1.b();
-
-    ctrl.replay();
-</pre>
-<h3>Nommer un Mock Object</h3>
-<p>
-Les Mock Objects peuvent ê nommés à leur création en utilisant 
-<code>createMock(String name, Class<T> toMock)</code>,
-<code>createStrictMock(String name, Class<T> toMock)</code> ou
-<code>createNiceMock(String name, Class<T> toMock)</code>.
-Les noms seront affichés dans le message des <code>AssertionError</code>.
-</p>
-<h3>Sérializer un Mock Object</h3>
-<p>
-Un Mock Object peut être sérializé à n'importe quelle étape de son 
-existence. Il y a toutefois des contraintes évidentes:
-</p>
-<ul>
-<li>Les comparateurs d'arguments utilisés doivent être sérializable (ceux fournis avec EasyMock le sont)
-</li>
-<li>Les paramètres enregistrés doivent être sérializable
-</li>
-</ul>
-<h3>Traitement multifil</h3>
-<p>
-Pendant la phase d'enregistrement un Mock Object <b>n'est pas</b> à fil sécurisé. Un Mock Object donné (ou des Mock Objects liés au
-même <code>IMocksControl</code>) ne peut être enregistré que d'un seul fil. Toutefois, plusieurs Mock Objects peuvent être enregistrés
-simultanément dans des fils différents.
-</p>
-<p>
-Durant la phase de rejeu, un Mock Object sera à fil sécurisé par défaut. Ceci peut être changé en appelant <code>makeThreadSafe(mock, false)</code>.
-durant la phase d'enregistrement. Cela peut permettre d'éviter des interblocages dans certaines rares situations.
-</p>
-<p>
-Finallement, appeler <code>checkIsUsedInOneThread(mock, true)</code> permet de s'assurer qu'un Mock Object ne sera appelé que d'un seul
-fil. Une exception sera lancé sinon. Cela peut être pratique dans le cas où l'objet "mocké" n'est pas à fil sécurisé et que l'on veut
-s'assurer qu'il est utilisé correctement.
-</p>
-<h3>EasyMockSupport</h3>
-<p>
-<code>EasyMockSupport</code> est une classe ayant pour but d'être utilisée comme classe utilitaire ou comme classe de base de vos classes 
-de test. Elle se souvient de tous les "Mock Objects" créés (ou en fait de tous les "Mock Controls" créés) pour pouvoir faire un replay, 
-reset ou verify de tous en un seul coup. Voici un exemple utilisant JUnit:
-</p>
-<pre>
-public class SupportTest extends EasyMockSupport {
-
-    private Collaborator firstCollaborator;
-    private Collaborator secondCollaborator;
-    private ClassTested classUnderTest;
-
-    @Before
-    public void setup() {
-        classUnderTest = new ClassTested();
-    }
-
-    @Test
-    public void addDocument() {
-        // phase de création
-        firstCollaborator = createMock(Collaborator.class);
-        secondCollaborator = createMock(Collaborator.class);
-        classUnderTest.addListener(firstCollaborator);
-        classUnderTest.addListener(secondCollaborator);
-
-        // phase d'enregistrement
-        firstCollaborator.documentAdded("New Document");
-        secondCollaborator.documentAdded("New Document");
-        
-        replayAll(); // tous les mocks d'un seul coup
-        
-        // test
-        classUnderTest.addDocument("New Document", new byte[0]);
-                
-        verifyAll(); // tous les mocks d'un seul coup
-    }
-}
-</pre>
-<h3>Modifier les comportements par défaut d'EasyMock</h3>
-<p>
-EasyMock fournit un mécanisme de gestion de propriétés permettant de modifier son comportement. Il vise
-principalement à permettre le retour à un comportement antérieur à la version courante. Les propriétés
-actuellement supportées sont:
-</p>
-<dl>
-<dt><code>easymock.notThreadSafeByDefault</code></dt>
-<dd>Si true, les Mock Objects ne seront pas à fil sécurisé par défaut. Values possibles: "true" ou "false". Défaut: false</dd>
-<dt><code>easymock.enableThreadSafetyCheckByDefault</code></dt>
-<dd>Si true, un mock ne pourra être appelé que d'un seul fil. Values possibles: "true" ou "false". Défaut: false</dd>
-<dt><code>easymock.disableClassMocking</code></dt>
-<dd>Ne pas permettre le mocking de classes (permettre uniquement le mocking d'interfaces). Valeurs possibles: "true" ou "false". Défaut: false</dd>
-</dl>
-<p>
-Les propriétés peuvent être fixées de deux façons.
-</p>
-<ul>
-<li>Dans le fichier <code>easymock.properties</code> mis dans le package défaut du classpath 
-</li>
-<li>En appelant <code>EasyMock.setEasyMockProperty</code>. Des constantes sont disponibles 
-dans la classe <code>EasyMock</code>. Évidemment, fixer une propriété dans le code écrase
-toute propriété mise dans <code>easymock.properties</code>
-</li>
-</ul>
-<h3>
-Compatibilité avec les anciennes versions
-</h3>
-<p>EasyMock 3 fournit toujours le project Class Extension (qui est toutefois déprécié) pour
-permettre une migration plus facile de EasyMock 2 vers EasyMock 3. Il s'agit d'une compatibilité des
-sources et non des binaires. Le code devra donc être recompilé. 
-</p>
-<p>EasyMock 2.1 introduisait une fonctionnalité de callback
-qui a été retirée dans EasyMock 2.2, car trop complexe. 
-Depuis EasyMock 2.2, l'interface <code>IAnswer</code>
-fournit la fonctionnalité de callback. 
-</p>
-<h3>OSGi</h3>
-<p>
-Le jar d'EasyMock peut être utilisé comme bundle OSGi. Il export les packages
-<code>org.easymock</code>, <code>org.easymock.internal</code> 
-et <code>org.easymock.internal.matchers</code>. Toutefois, pour importer les deux
-derniers, vous spécifier l'attribut <code>poweruser</code> à "true" (<code>poweruser=true</code>). 
-Ces packages sont prévus d'être utilisés pour étendre EasyMock, ils n'ont donc pas besoins d'être
-importés habituellement.
-</p>
-<h3>Mocking partiel</h3>
-<p>
-Dans certains cas, vous pouvez avoir besoin de "mocker" uniquement certaines
-méthodes d'une classe et de conserver un comportement normal pour
-les autres. Cela arrive habituellement lorsque pour souhaitez tester une
-méthode appelant d'autres méthodes de la même classe.
-Vous voulez donc garder le comportement normal de la méthode testée
-et "mocker" les autres.
-</p>
-<p>
-Dans ce cas, la premier réflexe à avoir est
-d'envisager un refactoring car, bien souvent, ce problème est la
-conséquence d'un mauvais design. Si ce n'est pas le cas ou si
-vous ne pouvez faire autrement pour une quelconque contrainte de 
-développement, voici la solution:
-</p>
-<pre>
-ToMock mock = createMockBuilder(ToMock.class)
-   .addMockedMethod("mockedMethod").createMock();
-</pre>
-<p>Seules les méthodes ajoutées avec <code>addMockedMethod(s)</code> seront
-"mockées" (<code>mockedMethod()</code> dans l'exemple). Les autres conservent leur
-comportement habituel. Une exception: les méthodes abstraites sont "mockées" par défaut.
-</p>
-<p><code>createMockBuilder</code> retourne l'interface <code>IMockBuilder</code>. Elle contient
-diverses méthodes pour facilement créer un mock partiel. Jettez un coup d'oeil à la javadoc
-pour en savoir plus.
-</p>
-<p><b>Remarque:</b> EasyMock fournit un comportement par défault pour les méthodes de la classe 
-Object (<i>equals, hashCode, toString, finalize</i>). Toutefois, pour un mock partiel, si ces méthodes ne sont pas
-mockées explicitement, elles auront leur comportement normal et non celui par défaut d'EasyMock.
-</p>
-<h3>Test interne d'une classe</h3>  
-<p>
-Il est possible de créer un mock en appelant un constructeur de la classe. Ceci
-peut être utile lorsqu'une méthode doit être testée mais d'autres
-dans la même classe "mockées". Pour cela vous devez faire quelque chose comme
-</p>
-<pre>
-ToMock mock = createMockBuilder(ToMock.class)
-   .withConstructor(1, 2, 3); // 1, 2, 3 sont les paramètres passés au constructeur
-</pre>
-<p>
-Voir <code>ConstructorCalledMockTest</code> pour un exemple d'utilisation.
-</p>
-<h3>Remplacer l'instantiateur de classes par défaut</h3>
-<p>
-Parfois (habituellement à cause d'une JVM non supportée), il est possible
-que EasyMock ne soit pas capable de créer un mock dans votre environnement java.
-Sous le capot, l'instantiation de classes est implémentée par un pattern "factory".
-En cas de problème, vous pouvez remplacer l'instantiateur par défaut avec:
-</p>
-<ul>
-<li>L'ancien <code>DefaultClassInstantiator</code> qui fonctionne très bien avec les classes
-sérializable et sinon tente de deviner quel constructeur appeler et quels paramètres lui passer.</li>
-<li>Votre propre instantiateur. Celui-ci doit implémenter <code>IClassInstantiator</code>.</li>
-</ul>
-<p>
-Vous assignez ce nouvel instantiateur à l'aide de <code>ClassInstantiatorFactory.setInstantiator()</code>.
-Vous pouvez remettre celui par défaut avec <code>setDefaultInstantiator()</code>.
-</p>
-<p>
-<b>Important:</b>
-L'instantiateur est gardé statiquement et reste donc entre deux tests. Assurez-vous
-de le réinitialiser si nécessaire.
-</p>
-<h3>Sérializer une classe mockée</h3>
-<p>
-Une class mockée peut aussi être sérializé. Toutefois, comme celle-ci étant une classe sérializable,
-cette dernière peut avoir un comportement spécial dû à l'implémentation de méthodes tels 
-que <code>writeObject</code>. Ces méthodes seront toujours appelées lorsque le mock sera sérializé
-et peuvent potentiellement échouer. Habituellement, le contournement consiste à créer le mock
-en appelant un constructeur.
-</p>
-<p>
-Aussi, il est possible que la dé-sérialization d'un mock ne fonctionne pas si elle est effectuée dans
-un class loader différent de la sérialization. Ce cas n'a pas été testé.
-</p>
-<h3>Limitations du mocking de classes</h3>
-<p> 
-Pour être cohérent avec le mocking d'interfaces, EasyMock fournit aussi un comportement par défaut 
-pour <code>equals()</code>, <code>toString()</code>, <code>hashCode()</code> et <code>finalize()</code> pour les classes mockées. 
-Cela signifie que vous ne pourrez enregistrer votre propre comportement pour ces méthodes. Cette 
-limitation être considérée comme une fonctionnalité permettant de ne pas s'occuper de ces
-méthodes.
-</p>
-<p>
-Les méthodes finales ne peuvent pas être "mockées". Si
-appelées, leur code normal sera exécuté.
-</p>
-<p>
-Les méthodes privées ne peuvent être "mockées". Si
-appelées, leur code normal sera exécuté. Pour un mock partiel, si
-la méthode testée appelle une méthode privée, vous devrez aussi tester
-cette dernière étant donné que vous ne pouvez pas la mocker.
-</p>
-<p>
-L'instantiation des classes est faite par 
-<a href="http://objenesis.googlecode.com/svn/docs/index.html">Objenesis</a>.
-Les JVMs supportées sont listées <a href="http://code.google.com/p/objenesis/wiki/ListOfCurrentlySupportedVMs">ici</a>.
-</p>
-<h3>Support Android</h3>
-<p>
-    Depuis la version 3.2, EasyMock peut être utilisé sur une VM Android (Dalvik). Il suffit d'ajouter la dépendance à
-    votre projet apk utilisé pour les tests de votre applicaiton. Il est aussi préférable d'exclure cglib étant donné
-    que dexmaker sera de toute façon utiliser en remplacement. Vous devrez aussi ajouter dexmaker explicitement étant
-    donné qu'il s'agit d'une dépendance optionnelle. Si vous utilisez Maven, vous finirez avec les dépendances suivantes
-</p>
-<pre>
-<dependency>
-  <groupId>org.easymock</groupId>
-  <artifactId>easymock</artifactId>
-  <version>3.2</version>
-  <exclusions>
-    <exclusion>
-      <groupId>cglib</groupId>
-      <artifactId>cglib-nodep</artifactId>
-    </exclusion>
-  </exclusions>
-</dependency>
-<dependency>
-  <groupId>com.google.dexmaker</groupId>
-  <artifactId>dexmaker</artifactId>
-  <version>1.0</version>
-</dependency>
-</pre>
-<h2>
-Développement d'EasyMock
-</h2>
-<p>
-EasyMock a été développé par Tammo Freese chez OFFIS. La maintenance est effectuée
-par Henri Tremblay depuis 2007. Le développement d'EasyMock est hébergé par 
-<a href="http://sourceforge.net/projects/easymock/">SourceForge</a>
-pour permettre à d'autres développeurs et sociétés d'y contribuer.
-</p>
-<p>
-Les Mock Objects de classes (précédemment appelé EasyMock Class Extension) ont été initialement 
-développée par Joel Shellman, Chad Woolley et Henri Tremblay dans la section 
-fichiers du of Yahoo!Groups.
-</p>
-<p>
-Remerciements à ceux qui nous ont fourni retour d'expérience et rustines, incluant
-Nascif Abousalh-Neto, Dave Astels, Francois Beausoleil, George Dinwiddie, Shane Duan, 
-Wolfgang Frech, Steve Freeman, Oren Gross, John D. Heintz, Dale King, Brian Knorr,
-Dierk Koenig, Chris Kreussling, Robert Leftwich, Patrick Lightbody, Johannes Link, 
-Rex Madden, David McIntosh, Karsten Menne, Bill Michell,
-Stephan Mikaty, Ivan Moore, Ilja Preuss, Justin Sampson, Markus Schmidlin, Richard Scott,
-Joel Shellman, Jiří Mareš, Alexandre de Pellegrin
-Shaun Smith, Marco Struck, Ralf Stuckert, Victor Szathmary, Bill Uetrecht,
-Frank Westphal, Chad Woolley, Bernd Worsch, 
-Rodrigo Damazio, Bruno Fonseca, Ben Hutchison et de nombreux autres.
-</p>
-<p>
-Merci de consulter la <a href="http://www.easymock.org">page d'accueil EasyMock</a> 
-pour être informé des nouvelles versions et transmettez vos bogues et suggestions à
-<a href="mailto:easymock at yahoogroups.com?subject=EasyMock ${project.version} feedback">EasyMock Yahoo!Group</a> (en anglais SVP).
-Si vous souhaitez souscrire au EasyMock Yahoo!Group, envoyez un message à
-<a href="mailto:easymock-subscribe at yahoogroups.com">easymock-subscribe at yahoogroups.com</a>.
-</p>
-</div>
-</body>
-</html>
diff --git a/easymock.css b/easymock.css
deleted file mode 100644
index fa24362..0000000
--- a/easymock.css
+++ /dev/null
@@ -1,106 +0,0 @@
-body {
-        font-family:Arial,Helvetica,sans-serif; 
-        font-size:11pt;
-        color:#000000;
-        background-color:#ffffff;
-        text-align:justify;
-}
-
-.bodywidth { 
-        width:880px;
-        position:absolute;
-        left:50%;
-        margin:0 0 0 -440px;
-}
-
-h1, h2, h3, .contentbar {
-        padding:3px;
-}
-
-h1, h2, h3 {
-        font-weight:bold;
-}
-
-h1 { 
-        font-size:24pt;
-        text-align:center;
-}
-
-h2, h3, .contentbar {
-        color:#000000;
-        background-color:#ccccff;
-        border:none;
-}
-
-h2 {
-        font-size:14pt; 
-}
-
-h3 {
-        font-size:10pt;
-}
-
-img {
-        border:0;
-}
-
-a:link { 
-        color:#666699;
-        text-decoration:underline;
-}
-
-a:visited {
-        color:#000000;
-        text-decoration:underline;
-}
-
-a:hover { 
-        color:#000000;
-        background-color:#ffffff;
-        text-decoration:none;
-}
-
-a:active { 
-        color:#000000;
-        font-weight:bold;
-        background-color:#ffffff;
-}
-
-a:link.heading, 
-a:visited.heading, 
-a:hover.heading, 
-a:active.heading {
-        color:#000000;
-        background-color:#ffffff;
-        text-decoration:none;
-}
-
-ul {
-        list-style-type:square;
-}
-
-pre {
-        color:#000000;
-        background-color:#cccccc;
-        font-family:monospace;
-        font-size:8pt;
-        padding:3px;
-}
-
-.buttonactive {
-        color:#990000;
-        font-weight:bold;
-}
-
-.contentbar {    
-        font-size:10pt;
-        text-align:center;
-}
-
-.right {
-        float:right;
-}
-
-.center {
-        text-align:center;
-}
diff --git a/samples/org/easymock/samples/AnnotatedMockTest.java b/samples/org/easymock/samples/AnnotatedMockWithRuleTest.java
similarity index 74%
copy from samples/org/easymock/samples/AnnotatedMockTest.java
copy to samples/org/easymock/samples/AnnotatedMockWithRuleTest.java
index 4edcb22..26b784c 100644
--- a/samples/org/easymock/samples/AnnotatedMockTest.java
+++ b/samples/org/easymock/samples/AnnotatedMockWithRuleTest.java
@@ -1,46 +1,48 @@
-/**
- * Copyright 2001-2013 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.easymock.samples;
-
-import org.easymock.EasyMockRunner;
-import org.easymock.EasyMockSupport;
-import org.easymock.TestSubject;
-import org.easymock.Mock;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * Example of how to use <code>@Mock</code> and <code>@TestSubject</code> annotations
- * 
- * @author Henri Tremblay
- */
- at RunWith(EasyMockRunner.class)
-public class AnnotatedMockTest extends EasyMockSupport {
-
-    @TestSubject
-    private final ClassTested classUnderTest = new ClassTested();
-
-    @Mock
-    private Collaborator collaborator;
-
-    @Test
-    public void addDocument() {
-        collaborator.documentAdded("New Document");
-        replayAll();
-        classUnderTest.addDocument("New Document", new byte[0]);
-        verifyAll();
-    }
-}
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock.samples;
+
+import org.easymock.EasyMockRule;
+import org.easymock.EasyMockSupport;
+import org.easymock.Mock;
+import org.easymock.TestSubject;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Example of how to use <code>@Mock</code> and <code>@TestSubject</code> annotations with Junit Rule.
+ * 
+ * @author Alistair Todd
+ */
+public class AnnotatedMockWithRuleTest extends EasyMockSupport {
+
+    @Rule
+    public EasyMockRule mocks = new EasyMockRule(this);
+
+    @Mock
+    private Collaborator collaborator;
+
+    @TestSubject
+    private final ClassTested classUnderTest = new ClassTested();
+
+    @Test
+    public void addDocument() {
+        collaborator.documentAdded("New Document");
+        replayAll();
+        classUnderTest.addDocument("New Document", "content");
+        verifyAll();
+    }
+}
diff --git a/samples/org/easymock/samples/AnnotatedMockTest.java b/samples/org/easymock/samples/AnnotatedMockWithRunnerTest.java
similarity index 81%
rename from samples/org/easymock/samples/AnnotatedMockTest.java
rename to samples/org/easymock/samples/AnnotatedMockWithRunnerTest.java
index 4edcb22..b833693 100644
--- a/samples/org/easymock/samples/AnnotatedMockTest.java
+++ b/samples/org/easymock/samples/AnnotatedMockWithRunnerTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,18 +17,18 @@ package org.easymock.samples;
 
 import org.easymock.EasyMockRunner;
 import org.easymock.EasyMockSupport;
-import org.easymock.TestSubject;
 import org.easymock.Mock;
+import org.easymock.TestSubject;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
 /**
- * Example of how to use <code>@Mock</code> and <code>@TestSubject</code> annotations
+ * Example of how to use <code>@Mock</code> and <code>@TestSubject</code> annotations with JUnit Runner.
  * 
  * @author Henri Tremblay
  */
 @RunWith(EasyMockRunner.class)
-public class AnnotatedMockTest extends EasyMockSupport {
+public class AnnotatedMockWithRunnerTest extends EasyMockSupport {
 
     @TestSubject
     private final ClassTested classUnderTest = new ClassTested();
@@ -40,7 +40,7 @@ public class AnnotatedMockTest extends EasyMockSupport {
     public void addDocument() {
         collaborator.documentAdded("New Document");
         replayAll();
-        classUnderTest.addDocument("New Document", new byte[0]);
+        classUnderTest.addDocument("New Document", "content");
         verifyAll();
     }
 }
diff --git a/samples/org/easymock/samples/BasicClassMockTest.java b/samples/org/easymock/samples/BasicClassMockTest.java
index 705a413..0284038 100644
--- a/samples/org/easymock/samples/BasicClassMockTest.java
+++ b/samples/org/easymock/samples/BasicClassMockTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/samples/org/easymock/samples/ClassTested.java b/samples/org/easymock/samples/ClassTested.java
index 8c40c81..caf958d 100644
--- a/samples/org/easymock/samples/ClassTested.java
+++ b/samples/org/easymock/samples/ClassTested.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,15 +25,15 @@ public class ClassTested {
 
     private Collaborator listener;
 
-    private final Map<String, byte[]> documents = new HashMap<String, byte[]>();
+    private final Map<String, String> documents = new HashMap<String, String>();
 
     public void setListener(final Collaborator listener) {
         this.listener = listener;
     }
 
-    public void addDocument(final String title, final byte[] document) {
+    public void addDocument(final String title, final String content) {
         final boolean documentChange = documents.containsKey(title);
-        documents.put(title, document);
+        documents.put(title, content);
         if (documentChange) {
             notifyListenersDocumentChanged(title);
         } else {
diff --git a/samples/org/easymock/samples/Collaborator.java b/samples/org/easymock/samples/Collaborator.java
index 6085d4d..5b7d659 100644
--- a/samples/org/easymock/samples/Collaborator.java
+++ b/samples/org/easymock/samples/Collaborator.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/samples/org/easymock/samples/ConstructorCalledMockTest.java b/samples/org/easymock/samples/ConstructorCalledMockTest.java
index 15a769f..158f091 100644
--- a/samples/org/easymock/samples/ConstructorCalledMockTest.java
+++ b/samples/org/easymock/samples/ConstructorCalledMockTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/samples/org/easymock/samples/ExampleTest.java b/samples/org/easymock/samples/ExampleTest.java
index 169e565..e088952 100644
--- a/samples/org/easymock/samples/ExampleTest.java
+++ b/samples/org/easymock/samples/ExampleTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
 package org.easymock.samples;
 
 /**
- * @author OFFIS, Tammo Freese
+ * @author OFFIS, Tammo Freese, Henri Tremblay
  */
 import static org.easymock.EasyMock.*;
 import static org.junit.Assert.*;
@@ -24,35 +24,33 @@ import static org.junit.Assert.*;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.easymock.IAnswer;
-import org.junit.Before;
+import org.easymock.*;
+import org.junit.Rule;
 import org.junit.Test;
 
-public class ExampleTest {
+public class ExampleTest extends EasyMockSupport {
 
-    private ClassTested classUnderTest;
+    @Rule
+    public EasyMockRule rule = new EasyMockRule(this);
 
-    private Collaborator mock;
+    @TestSubject
+    private ClassTested classUnderTest = new ClassTested();
 
-    @Before
-    public void setup() {
-        mock = createMock(Collaborator.class);
-        classUnderTest = new ClassTested();
-        classUnderTest.setListener(mock);
-    }
+    @Mock
+    private Collaborator mock;
 
     @Test
     public void removeNonExistingDocument() {
-        replay(mock);
+        replayAll();
         classUnderTest.removeDocument("Does not exist");
     }
 
     @Test
     public void addDocument() {
         mock.documentAdded("New Document");
-        replay(mock);
-        classUnderTest.addDocument("New Document", new byte[0]);
-        verify(mock);
+        replayAll();
+        classUnderTest.addDocument("New Document", "content");
+        verifyAll();
     }
 
     @Test
@@ -60,12 +58,12 @@ public class ExampleTest {
         mock.documentAdded("Document");
         mock.documentChanged("Document");
         expectLastCall().times(3);
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        classUnderTest.addDocument("Document", new byte[0]);
-        verify(mock);
+        replayAll();
+        classUnderTest.addDocument("Document", "content");
+        classUnderTest.addDocument("Document", "content");
+        classUnderTest.addDocument("Document", "content");
+        classUnderTest.addDocument("Document", "content");
+        verifyAll();
     }
 
     @Test
@@ -77,10 +75,10 @@ public class ExampleTest {
         // expect document removal
         mock.documentRemoved("Document");
 
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
+        replayAll();
+        classUnderTest.addDocument("Document", "content");
         assertTrue(classUnderTest.removeDocument("Document"));
-        verify(mock);
+        verifyAll();
     }
 
     @Test
@@ -91,10 +89,10 @@ public class ExampleTest {
         expect(mock.voteForRemoval("Document")).andReturn((byte) -42); // 
         // document removal is *not* expected
 
-        replay(mock);
-        classUnderTest.addDocument("Document", new byte[0]);
+        replayAll();
+        classUnderTest.addDocument("Document", "content");
         assertFalse(classUnderTest.removeDocument("Document"));
-        verify(mock);
+        verifyAll();
     }
 
     @Test
@@ -104,11 +102,11 @@ public class ExampleTest {
         expect(mock.voteForRemovals("Document 1", "Document 2")).andReturn((byte) 42);
         mock.documentRemoved("Document 1");
         mock.documentRemoved("Document 2");
-        replay(mock);
-        classUnderTest.addDocument("Document 1", new byte[0]);
-        classUnderTest.addDocument("Document 2", new byte[0]);
+        replayAll();
+        classUnderTest.addDocument("Document 1", "content 1");
+        classUnderTest.addDocument("Document 2", "content 2");
         assertTrue(classUnderTest.removeDocuments(new String[] { "Document 1", "Document 2" }));
-        verify(mock);
+        verifyAll();
     }
 
     @Test
@@ -116,11 +114,11 @@ public class ExampleTest {
         mock.documentAdded("Document 1");
         mock.documentAdded("Document 2");
         expect(mock.voteForRemovals("Document 1", "Document 2")).andReturn((byte) -42);
-        replay(mock);
-        classUnderTest.addDocument("Document 1", new byte[0]);
-        classUnderTest.addDocument("Document 2", new byte[0]);
+        replayAll();
+        classUnderTest.addDocument("Document 1", "content 1");
+        classUnderTest.addDocument("Document 2", "content 2");
         assertFalse(classUnderTest.removeDocuments("Document 1", "Document 2"));
-        verify(mock);
+        verifyAll();
     }
 
     @SuppressWarnings("unchecked")
@@ -145,11 +143,11 @@ public class ExampleTest {
             }
         });
 
-        replay(l);
+        replayAll();
 
         assertEquals("10", l.remove(10));
         assertEquals("10", l.remove(10));
 
-        verify(l);
+        verifyAll();
     }
 }
diff --git a/samples/org/easymock/samples/PartialClassMockTest.java b/samples/org/easymock/samples/PartialClassMockTest.java
index 6de09fa..81bbdf9 100644
--- a/samples/org/easymock/samples/PartialClassMockTest.java
+++ b/samples/org/easymock/samples/PartialClassMockTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/samples/org/easymock/samples/SupportTest.java b/samples/org/easymock/samples/SupportTest.java
index 17f6e70..8472dec 100644
--- a/samples/org/easymock/samples/SupportTest.java
+++ b/samples/org/easymock/samples/SupportTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ public class SupportTest extends EasyMockSupport {
         classUnderTest.setListener(collaborator);
         collaborator.documentAdded("New Document");
         replayAll();
-        classUnderTest.addDocument("New Document", new byte[0]);
+        classUnderTest.addDocument("New Document", "content");
         verifyAll();
     }
 
@@ -62,7 +62,7 @@ public class SupportTest extends EasyMockSupport {
 
         replayAll();
 
-        classUnderTest.addDocument("Document 1", new byte[0]);
+        classUnderTest.addDocument("Document 1", "content");
         assertTrue(classUnderTest.removeDocuments("Document 1"));
 
         verifyAll();
diff --git a/samples/org/easymock/samples/ThrowableEquals.java b/samples/org/easymock/samples/ThrowableEquals.java
index 2166bd3..9051a40 100644
--- a/samples/org/easymock/samples/ThrowableEquals.java
+++ b/samples/org/easymock/samples/ThrowableEquals.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/Capture.java b/src/org/easymock/Capture.java
index a1bc5e2..4d06119 100644
--- a/src/org/easymock/Capture.java
+++ b/src/org/easymock/Capture.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,22 +38,50 @@ public class Capture<T> implements Serializable {
 
     /**
      * Default constructor. Only the last element will be captured
+     *
+     * @deprecated Use {@link EasyMock#newCapture()} instead
      */
+    @Deprecated
     public Capture() {
         this(CaptureType.LAST);
     }
 
     /**
      * Constructor allowing to select the capture type
-     * 
+     *
      * @param type
      *            capture type
+     * @deprecated Use {@link org.easymock.EasyMock#newCapture(CaptureType)} instead
      */
+    @Deprecated
     public Capture(final CaptureType type) {
         this.type = type;
     }
 
     /**
+     * Create a new capture instance that will keep only the last captured value
+     *
+     * @param <T> type of the class to be captured
+     * @return the new capture object
+     */
+    @SuppressWarnings("deprecation")
+    public static <T> Capture<T> newInstance() {
+        return new Capture<T>();
+    }
+
+    /**
+     * Create a new capture instance with a specific {@link org.easymock.CaptureType}
+     *
+     * @param type capture type wanted
+     * @param <T> type of the class to be captured
+     * @return the new capture object
+     */
+    @SuppressWarnings("deprecation")
+    public static <T> Capture<T> newInstance(CaptureType type) {
+        return new Capture<T>(type);
+    }
+
+    /**
      * Will reset capture to a "nothing captured yet" state
      */
     public void reset() {
diff --git a/src/org/easymock/CaptureType.java b/src/org/easymock/CaptureType.java
index cf927e5..a47682c 100644
--- a/src/org/easymock/CaptureType.java
+++ b/src/org/easymock/CaptureType.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/ConstructorArgs.java b/src/org/easymock/ConstructorArgs.java
index 5b6aabe..ea1aef7 100644
--- a/src/org/easymock/ConstructorArgs.java
+++ b/src/org/easymock/ConstructorArgs.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/EasyMock.java b/src/org/easymock/EasyMock.java
index e7bc0e8..247dfef 100644
--- a/src/org/easymock/EasyMock.java
+++ b/src/org/easymock/EasyMock.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -529,8 +529,7 @@ public class EasyMock {
      * @param value
      *            the parameter is used to transport the type to the
      *            ExpectationSetter. It allows writing the expected call as
-     *            argument, i.e.
-     *            <code>expect(mock.getName()).andReturn("John Doe")<code>.
+     *            argument, i.e. expect(mock.getName()).andReturn("John Doe").
      * 
      * @return the expectation setter.
      */
@@ -1903,6 +1902,27 @@ public class EasyMock {
     }
 
     /**
+     * Create a new capture instance that will keep only the last captured value.
+     *
+     * @param <T> type of the class to be captured
+     * @return the new capture object
+     */
+    public static <T> Capture<T> newCapture() {
+        return Capture.newInstance();
+    }
+
+    /**
+     * Create a new capture instance with a specific {@link org.easymock.CaptureType}
+     *
+     * @param type capture type wanted
+     * @param <T> type of the class to be captured
+     * @return the new capture object
+     */
+    public static <T> Capture<T> newCapture(CaptureType type) {
+        return Capture.newInstance(type);
+    }
+
+    /**
      * Expect any object but captures it for later use.
      * 
      * @param <T>
@@ -2100,7 +2120,7 @@ public class EasyMock {
      * Reports an argument matcher. This method is needed to define own argument
      * matchers. For details, see the EasyMock documentation.
      * 
-     * @param matcher
+     * @param matcher the matcher to use to match currently mocked method argument
      */
     public static void reportMatcher(final IArgumentMatcher matcher) {
         LastControl.reportMatcher(matcher);
diff --git a/src/org/easymock/EasyMockRule.java b/src/org/easymock/EasyMockRule.java
new file mode 100644
index 0000000..fe611b3
--- /dev/null
+++ b/src/org/easymock/EasyMockRule.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock;
+
+import org.easymock.internal.EasyMockStatement;
+import org.junit.rules.TestRule;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+/**
+ * JUnit Rule used to process {@link Mock} and {@link TestSubject} annotations.
+ * 
+ * @author Alistair Todd
+ * @since 3.3
+ */
+public class EasyMockRule implements TestRule {
+
+    private final Object test;
+
+    public EasyMockRule(final Object test) {
+        this.test = test;
+    }
+
+    public Statement apply(final Statement base, final Description description) {
+        return new EasyMockStatement(base, test);
+    }
+
+}
diff --git a/src/org/easymock/EasyMockRunner.java b/src/org/easymock/EasyMockRunner.java
index 0911c4b..a4a7b85 100644
--- a/src/org/easymock/EasyMockRunner.java
+++ b/src/org/easymock/EasyMockRunner.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,8 @@ import org.junit.runners.model.InitializationError;
 import org.junit.runners.model.Statement;
 
 /**
- * JUnit runner used to process {@link Mock} and {@link TestSubject} annotations
+ * JUnit runner used to process {@link Mock} and {@link TestSubject} annotations. Note
+ * that this runner only works with JUnit 4.5 or higher
  * 
  * @author Henri Tremblay
  * @since 3.2
@@ -32,27 +33,21 @@ public class EasyMockRunner extends BlockJUnit4ClassRunner {
         super(klass);
     }
 
+    /**
+     * We are required to override a deprecated method because it's the only way the perform
+     * the mock injection before the {@code @Before} of our class being called. Using a statement
+     * wouldn't work.
+     *
+     * @param method test method class
+     * @param target test class instance
+     * @param statement current statement
+     * @return a statement to return to the caller
+     */
+    @SuppressWarnings("deprecation")
     @Override
-    protected Statement methodInvoker(final FrameworkMethod method, final Object test) {
-        return new EasyMockStatement(super.methodInvoker(method, test), test);
-    }
-
-}
-
-class EasyMockStatement extends Statement {
-
-    private final Statement originalStatement;
-
-    private final Object test;
-
-    public EasyMockStatement(final Statement originalStatement, final Object test) {
-        this.originalStatement = originalStatement;
-        this.test = test;
-    }
-
-    @Override
-    public void evaluate() throws Throwable {
-        EasyMockSupport.injectMocks(test);
-        originalStatement.evaluate();
+    protected Statement withBefores(FrameworkMethod method, Object target,
+            Statement statement) {
+        EasyMockSupport.injectMocks(target);
+        return super.withBefores(method, target, statement);
     }
 }
diff --git a/src/org/easymock/EasyMockSupport.java b/src/org/easymock/EasyMockSupport.java
index ed483c4..1790742 100644
--- a/src/org/easymock/EasyMockSupport.java
+++ b/src/org/easymock/EasyMockSupport.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,12 +15,11 @@
  */
 package org.easymock;
 
-import java.lang.reflect.Field;
 import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.easymock.internal.Injector;
 import org.easymock.internal.MockBuilder;
 
 /**
@@ -604,9 +603,15 @@ public class EasyMockSupport {
      * The rules are
      * <ul>
      *     <li>Static and final fields are ignored</li>
-     *     <li>If a mock can be assigned to a field, do it. The same mock an be assigned more than once</li>
-     *     <li>If no mock can be assigned to a field, skip it silently</li>
-     *     <li>If two mocks can be assigned to the same field, return an error</li>
+     *     <li>If two mocks have the same field name, return an error</li>
+     *     <li>If a mock has a field name and no matching field is found, return an error</li>
+     * </ul>
+     * Then, ignoring all fields and mocks matched by field name
+     * <ul>
+     *     <li>If a mock without field name can be assigned to a field, do it. The same mock can be assigned more than once</li>
+     *     <li>If no mock can be assigned to a field, skip the field silently</li>
+     *     <li>If the mock cannot be assigned to any field, skip the mock silently</li>          
+     *     <li>If two mocks can be assigned to the same field, return an error</li>          
      * </ul>
      * Fields are searched recursively on the superclasses
      * <p>
@@ -616,113 +621,6 @@ public class EasyMockSupport {
      * @since 3.2
      */
     public static void injectMocks(final Object obj) {
-        List<Field> injectMockFields = new ArrayList<Field>(1);
-        List<Object> mocks = new ArrayList<Object>(5);
-
-        Class<?> c = obj.getClass();
-        while(c != Object.class) {
-            createMocksForAnnotations(c, obj, mocks, injectMockFields);
-            c = c.getSuperclass();
-        }
-
-        for(Field f : injectMockFields) {
-            f.setAccessible(true);
-            Object o;
-            try {
-                o = f.get(obj);
-            } catch (IllegalAccessException e) {
-                // ///CLOVER:OFF
-                throw new RuntimeException(e);
-                // ///CLOVER:ON
-            }
-            c = o.getClass();
-            while(c != Object.class) {
-                injectMocksOnClass(c, o, mocks);
-                c = c.getSuperclass();
-            }
-        }
-    }
-
-    /**
-     * Try to inject a mock to every fields in the class
-     *
-     * @param clazz class where the fields are taken
-     * @param obj object being a instance of clazz
-     * @param mocks list of possible mocks
-     */
-    private static void injectMocksOnClass(Class<?> clazz, Object obj, List<Object> mocks) {
-        final Field[] fields = clazz.getDeclaredFields();
-        for (final Field f : fields) {
-            // Skip final or static fields
-            if((f.getModifiers() & (Modifier.STATIC + Modifier.FINAL)) != 0) {
-                continue;
-            }
-            final Class<?> type = f.getType();
-            Object toAssign = null;
-            for(Object mock : mocks) {
-                if(type.isAssignableFrom(mock.getClass())) {
-                    if(toAssign != null) {
-                        throw new RuntimeException("At least two mocks can be assigned to " + f + ": " + toAssign + " and " + mock);
-                    }
-                    toAssign = mock;
-                }
-            }
-            if(toAssign == null) {
-                continue;
-            }
-            f.setAccessible(true);
-            try {
-                f.set(obj, toAssign);
-            } catch (final IllegalAccessException e) {
-                // ///CLOVER:OFF
-                throw new RuntimeException(e);
-                // ///CLOVER:ON
-            }
-        }
-    }
-
-    /**
-     * Create the mocks and find the fields annotated with {@link TestSubject}
-     *
-     * @param clazz class to search
-     * @param obj object of the class
-     * @param mocks output parameter where the created mocks are added
-     * @param injectMockFields output parameter where the fields to inject are added
-     */
-    private static void createMocksForAnnotations(Class<?> clazz, Object obj, List<Object> mocks, List<Field> injectMockFields) {
-        final Field[] fields = clazz.getDeclaredFields();
-        for (final Field f : fields) {
-            final TestSubject ima = f.getAnnotation(TestSubject.class);
-            if(ima != null) {
-                injectMockFields.add(f);
-                continue;
-            }
-            final Mock annotation = f.getAnnotation(Mock.class);
-            if (annotation == null) {
-                continue;
-            }
-            final Class<?> type = f.getType();
-            String name = annotation.name();
-            // Empty string means we are on the default value which we means no name (aka null) from the EasyMock point of view
-            name = (name.length() == 0 ? null : name);
-
-            MockType mockType = annotation.type();
-            Object o;
-            if (obj instanceof EasyMockSupport) {
-                o = ((EasyMockSupport) obj).createMock(name, mockType, type);
-            }
-            else {
-                o = EasyMock.createMock(name, mockType, type);
-            }
-            f.setAccessible(true);
-            try {
-                f.set(obj, o);
-            } catch (final IllegalAccessException e) {
-                // ///CLOVER:OFF
-                throw new RuntimeException(e);
-                // ///CLOVER:ON
-            }
-            mocks.add(o);
-        }
+        Injector.injectMocks(obj);
     }
 }
diff --git a/src/org/easymock/IAnswer.java b/src/org/easymock/IAnswer.java
index 1b0dab4..cda6c37 100644
--- a/src/org/easymock/IAnswer.java
+++ b/src/org/easymock/IAnswer.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/IArgumentMatcher.java b/src/org/easymock/IArgumentMatcher.java
index 15cb66c..bd17078 100644
--- a/src/org/easymock/IArgumentMatcher.java
+++ b/src/org/easymock/IArgumentMatcher.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/IExpectationSetters.java b/src/org/easymock/IExpectationSetters.java
index f7d9a5c..b819115 100644
--- a/src/org/easymock/IExpectationSetters.java
+++ b/src/org/easymock/IExpectationSetters.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -68,6 +68,16 @@ public interface IExpectationSetters<T> {
     IExpectationSetters<T> andDelegateTo(Object delegateTo);
 
     /**
+     * Records a call but returns nothing. Used to chain calls on void methods
+     * <code>
+     *     expectLastCall().andThrow(e).andVoid();
+     * </code>
+     *
+     * @return this object to allow method call chaining.
+     */
+    IExpectationSetters<T> andVoid();
+
+    /**
      * Sets a stub return value that will be returned for the expected
      * invocation.
      * 
@@ -114,7 +124,7 @@ public interface IExpectationSetters<T> {
      * Expect the last invocation <code>count</code> times.
      * 
      * @param count
-     *            the number of invocations expected.
+     *            the number of invocations expected
      * @return this object to allow method call chaining.
      */
     IExpectationSetters<T> times(int count);
diff --git a/src/org/easymock/IMockBuilder.java b/src/org/easymock/IMockBuilder.java
index 8088f24..d9ac974 100644
--- a/src/org/easymock/IMockBuilder.java
+++ b/src/org/easymock/IMockBuilder.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/IMocksControl.java b/src/org/easymock/IMocksControl.java
index b397645..9febde5 100644
--- a/src/org/easymock/IMocksControl.java
+++ b/src/org/easymock/IMocksControl.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/LogicalOperator.java b/src/org/easymock/LogicalOperator.java
index cbf19c7..8f3c4bf 100644
--- a/src/org/easymock/LogicalOperator.java
+++ b/src/org/easymock/LogicalOperator.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/Mock.java b/src/org/easymock/Mock.java
index 5149ebd..551dea9 100644
--- a/src/org/easymock/Mock.java
+++ b/src/org/easymock/Mock.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ package org.easymock;
 import java.lang.annotation.*;
 
 /**
- * Annotation to set on a field so that {@link EasyMockRunner} or {@link EasyMockSupport#injectMocks(Object)}
+ * Annotation to set on a field so that {@link EasyMockRunner}, {@link EasyMockRule} or {@link EasyMockSupport#injectMocks(Object)}
  * will inject a mock to it.
  * <p>
  * Doing<br>
@@ -34,9 +34,19 @@ import java.lang.annotation.*;
 @Documented
 public @interface Mock {
 
-    /** Type of mock to create */
+    /** @return type of mock to create */
     MockType type() default MockType.DEFAULT;
 
-    /** Name of the mock to be created */
+    /** @return name of the mock to be created */
     String name() default "";
+
+    /**
+     * Name of the test subject field to which this mock will be assigned. Use to disambiguate the case where a mock may be assigned to multiple fields of the same type.
+     * When set, this mock will be assigned to the given field name in any test subject with a matching field name.
+     * If not set, injection is to all type-compatible fields in all test subjects.
+     * A given field name may only be used once, and there must be a matching field in at least one test subject.
+     *
+     * @return name of the field to inject to
+     **/
+    String fieldName() default "";
 }
diff --git a/src/org/easymock/MockType.java b/src/org/easymock/MockType.java
index 029e0fc..8854c01 100644
--- a/src/org/easymock/MockType.java
+++ b/src/org/easymock/MockType.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/TestSubject.java b/src/org/easymock/TestSubject.java
index 66d01ef..17f4460 100644
--- a/src/org/easymock/TestSubject.java
+++ b/src/org/easymock/TestSubject.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ package org.easymock;
 import java.lang.annotation.*;
 
 /**
- * Annotation to set on a field so that {@link EasyMockRunner} or {@link EasyMockSupport#injectMocks(Object)}
+ * Annotation to set on a field so that {@link EasyMockRunner}, {@link EasyMockRule} or {@link EasyMockSupport#injectMocks(Object)}
  * will inject mocks created with {@link Mock} on its fields.
  * <p>
  * See {@link EasyMockSupport#injectMocks(Object)} for the injection rules.
diff --git a/src/org/easymock/internal/AndroidClassProxyFactory.java b/src/org/easymock/internal/AndroidClassProxyFactory.java
index da04042..3e7f11c 100644
--- a/src/org/easymock/internal/AndroidClassProxyFactory.java
+++ b/src/org/easymock/internal/AndroidClassProxyFactory.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/AndroidSupport.java b/src/org/easymock/internal/AndroidSupport.java
index 43c683e..dd073cf 100644
--- a/src/org/easymock/internal/AndroidSupport.java
+++ b/src/org/easymock/internal/AndroidSupport.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,6 +24,12 @@ public final class AndroidSupport {
     static {
         try {
             Class.forName("dalvik.system.PathClassLoader");
+
+            // Also verify that dexmaker is present, if not we might
+            // be running under something like robolectric, which
+            // means we should not use dexmaker
+            Class.forName("com.google.dexmaker.Code");
+
             isAndroid = true;
         } catch (final ClassNotFoundException e) {
             isAndroid = false;
diff --git a/src/org/easymock/internal/ArgumentToString.java b/src/org/easymock/internal/ArgumentToString.java
index c1e3c50..59302d3 100644
--- a/src/org/easymock/internal/ArgumentToString.java
+++ b/src/org/easymock/internal/ArgumentToString.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/AssertionErrorWrapper.java b/src/org/easymock/internal/AssertionErrorWrapper.java
index 5c30e07..dfc0503 100644
--- a/src/org/easymock/internal/AssertionErrorWrapper.java
+++ b/src/org/easymock/internal/AssertionErrorWrapper.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/BridgeMethodResolver.java b/src/org/easymock/internal/BridgeMethodResolver.java
index 8a8e5d5..97bf09c 100644
--- a/src/org/easymock/internal/BridgeMethodResolver.java
+++ b/src/org/easymock/internal/BridgeMethodResolver.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ClassInstantiatorFactory.java b/src/org/easymock/internal/ClassInstantiatorFactory.java
index 0bea8db..4f682fb 100644
--- a/src/org/easymock/internal/ClassInstantiatorFactory.java
+++ b/src/org/easymock/internal/ClassInstantiatorFactory.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ClassProxyFactory.java b/src/org/easymock/internal/ClassProxyFactory.java
index a90f2a7..5847fa5 100644
--- a/src/org/easymock/internal/ClassProxyFactory.java
+++ b/src/org/easymock/internal/ClassProxyFactory.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/DefaultClassInstantiator.java b/src/org/easymock/internal/DefaultClassInstantiator.java
index aa64a9b..5ce002d 100644
--- a/src/org/easymock/internal/DefaultClassInstantiator.java
+++ b/src/org/easymock/internal/DefaultClassInstantiator.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/EasyMockProperties.java b/src/org/easymock/internal/EasyMockProperties.java
index e1922a2..4260996 100644
--- a/src/org/easymock/internal/EasyMockProperties.java
+++ b/src/org/easymock/internal/EasyMockProperties.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/EasyMockRunner.java b/src/org/easymock/internal/EasyMockStatement.java
similarity index 58%
copy from src/org/easymock/EasyMockRunner.java
copy to src/org/easymock/internal/EasyMockStatement.java
index 0911c4b..3667965 100644
--- a/src/org/easymock/EasyMockRunner.java
+++ b/src/org/easymock/internal/EasyMockStatement.java
@@ -1,58 +1,45 @@
-/**
- * Copyright 2001-2013 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.easymock;
-
-import org.junit.runners.BlockJUnit4ClassRunner;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.InitializationError;
-import org.junit.runners.model.Statement;
-
-/**
- * JUnit runner used to process {@link Mock} and {@link TestSubject} annotations
- * 
- * @author Henri Tremblay
- * @since 3.2
- */
-public class EasyMockRunner extends BlockJUnit4ClassRunner {
-
-    public EasyMockRunner(final Class<?> klass) throws InitializationError {
-        super(klass);
-    }
-
-    @Override
-    protected Statement methodInvoker(final FrameworkMethod method, final Object test) {
-        return new EasyMockStatement(super.methodInvoker(method, test), test);
-    }
-
-}
-
-class EasyMockStatement extends Statement {
-
-    private final Statement originalStatement;
-
-    private final Object test;
-
-    public EasyMockStatement(final Statement originalStatement, final Object test) {
-        this.originalStatement = originalStatement;
-        this.test = test;
-    }
-
-    @Override
-    public void evaluate() throws Throwable {
-        EasyMockSupport.injectMocks(test);
-        originalStatement.evaluate();
-    }
-}
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock.internal;
+
+import org.easymock.EasyMockSupport;
+import org.easymock.Mock;
+import org.easymock.TestSubject;
+import org.junit.runners.model.Statement;
+
+/**
+ * JUnit Statement for use by JUnit Rule or JUnit Runner to process {@link Mock} and {@link TestSubject} annotations.
+ *
+ * @author Henri Tremblay
+ * @since 3.3
+ */
+public class EasyMockStatement extends Statement {
+
+    private final Statement originalStatement;
+
+    private final Object test;
+
+    public EasyMockStatement(final Statement originalStatement, final Object test) {
+        this.originalStatement = originalStatement;
+        this.test = test;
+    }
+
+    @Override
+    public void evaluate() throws Throwable {
+        EasyMockSupport.injectMocks(test);
+        originalStatement.evaluate();
+    }
+}
\ No newline at end of file
diff --git a/src/org/easymock/internal/ErrorMessage.java b/src/org/easymock/internal/ErrorMessage.java
index 6950d78..6b6cae3 100644
--- a/src/org/easymock/internal/ErrorMessage.java
+++ b/src/org/easymock/internal/ErrorMessage.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ExpectedInvocation.java b/src/org/easymock/internal/ExpectedInvocation.java
index 1d3337d..0ad1b47 100644
--- a/src/org/easymock/internal/ExpectedInvocation.java
+++ b/src/org/easymock/internal/ExpectedInvocation.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ExpectedInvocationAndResult.java b/src/org/easymock/internal/ExpectedInvocationAndResult.java
index 5505c20..09b1a45 100644
--- a/src/org/easymock/internal/ExpectedInvocationAndResult.java
+++ b/src/org/easymock/internal/ExpectedInvocationAndResult.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ExpectedInvocationAndResults.java b/src/org/easymock/internal/ExpectedInvocationAndResults.java
index 0cab01a..8971994 100644
--- a/src/org/easymock/internal/ExpectedInvocationAndResults.java
+++ b/src/org/easymock/internal/ExpectedInvocationAndResults.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/IClassInstantiator.java b/src/org/easymock/internal/IClassInstantiator.java
index c4163b9..e61cbc0 100644
--- a/src/org/easymock/internal/IClassInstantiator.java
+++ b/src/org/easymock/internal/IClassInstantiator.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/IMocksBehavior.java b/src/org/easymock/internal/IMocksBehavior.java
index 1c41713..b1b9c57 100644
--- a/src/org/easymock/internal/IMocksBehavior.java
+++ b/src/org/easymock/internal/IMocksBehavior.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/IMocksControlState.java b/src/org/easymock/internal/IMocksControlState.java
index f053945..021a23b 100644
--- a/src/org/easymock/internal/IMocksControlState.java
+++ b/src/org/easymock/internal/IMocksControlState.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,6 +34,8 @@ public interface IMocksControlState {
 
     void andDelegateTo(Object answer);
 
+    void andVoid();
+
     void andStubReturn(Object value);
 
     void andStubThrow(Throwable throwable);
diff --git a/src/org/easymock/internal/IProxyFactory.java b/src/org/easymock/internal/IProxyFactory.java
index 10bf09e..249c8ff 100644
--- a/src/org/easymock/internal/IProxyFactory.java
+++ b/src/org/easymock/internal/IProxyFactory.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/Injection.java b/src/org/easymock/internal/Injection.java
new file mode 100644
index 0000000..88bcea2
--- /dev/null
+++ b/src/org/easymock/internal/Injection.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock.internal;
+
+import org.easymock.Mock;
+
+/**
+ * Described mock instance for injection.
+ * 
+ * @author Alistair Todd
+ * @since 3.3
+ */
+public class Injection {
+
+    private final Object mock;
+
+    private final Mock annotation;
+
+    private boolean matched = false;
+
+    /**
+     * Create instance containing the given mock and annotation.
+     * @param mock a mock object instance
+     * @param annotation Mock annotation describing the mock
+     */
+    public Injection(final Object mock, final Mock annotation) {
+        this.mock = mock;
+        this.annotation = annotation;
+    }
+
+    /**
+     * Gets the mock instance for this injection.
+     * 
+     * @return a mock object instance
+     */
+    public Object getMock() {
+        return mock;
+    }
+
+    /**
+     * Gets the annotation describing this mock instance.
+     * 
+     * @return annotation describing the mock instance
+     */
+    public Mock getAnnotation() {
+        return annotation;
+    }
+
+    /**
+     * Get the field name qualifier for this injection.
+     * @return the field name qualifier for this injection which may be empty string where not set.
+     */
+    public String getQualifier() {
+        return annotation.fieldName();
+    }
+
+    /**
+     * Change the status to indicate that this injection was matched to some target.
+     */
+    public void setMatched() {
+        matched = true;
+    }
+
+    /**
+     * Is this injection matched by some injection target?
+     * @return true if setMatched was called, indicating that a matching injection target was found
+     */
+    public boolean isMatched() {
+        return matched;
+    }
+}
diff --git a/src/org/easymock/internal/InjectionPlan.java b/src/org/easymock/internal/InjectionPlan.java
new file mode 100644
index 0000000..2dae12e
--- /dev/null
+++ b/src/org/easymock/internal/InjectionPlan.java
@@ -0,0 +1,98 @@
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock.internal;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Container for mock injections and test subject injection targets.
+ * 
+ * @author Alistair Todd
+ * @since 3.3
+ */
+public class InjectionPlan {
+
+    private final List<Field> testSubjectFields = new ArrayList<Field>(1);
+
+    private final List<Injection> qualifiedInjections = new ArrayList<Injection>(5);
+
+    private final List<Injection> unqualifiedInjections = new ArrayList<Injection>(5);
+
+    private final Set<String> qualifiers = new HashSet<String>();
+
+    /**
+     * Add an {@link Injection} to this container. It will be managed according to the presence
+     * of a fieldName qualifier, and attempting to add an Injection with a duplicate fieldName
+     * qualifier will cause an error.
+     * 
+     * @param injection Injection to manage as part of this plan
+     */
+    public void addInjection(final Injection injection) {
+
+        final String qualifier = injection.getAnnotation().fieldName();
+
+        if (qualifier.length() != 0) {
+            blockDuplicateQualifiers(qualifier);
+            qualifiedInjections.add(injection);
+        } else {
+            unqualifiedInjections.add(injection);
+        }
+    }
+
+    private void blockDuplicateQualifiers(final String qualifier) {
+        if (!qualifiers.add(qualifier)) {
+            throw new RuntimeException(
+                    String.format("At least two mocks have fieldName qualifier '%s'", qualifier));
+        }
+    }
+
+    /**
+     * Add a field that should be treated as a test subject injection target.
+     * @param f Field representing a test subject to which injection of mocks will be attempted
+     */
+    public void addTestSubjectField(final Field f) {
+        testSubjectFields.add(f);
+    }
+
+    /**
+     * Get fields identified as test subjects to which injection of mocks should be attempted.
+     * @return fields representing test subjects
+     */
+    public List<Field> getTestSubjectFields() {
+        return testSubjectFields;
+    }
+
+    /**
+     * Get all injections having fieldName qualifiers.
+     * @return list of Injections having fieldName qualifiers
+     */
+    public List<Injection> getQualifiedInjections() {
+        return qualifiedInjections;
+    }
+
+    /**
+     * Get all injections that do not have fieldName qualifiers.
+     * @return list of Injections that do not have fieldName qualifiers.
+     */
+    public List<Injection> getUnqualifiedInjections() {
+        return unqualifiedInjections;
+    }
+
+}
diff --git a/src/org/easymock/internal/InjectionTarget.java b/src/org/easymock/internal/InjectionTarget.java
new file mode 100644
index 0000000..fee3fd1
--- /dev/null
+++ b/src/org/easymock/internal/InjectionTarget.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock.internal;
+
+import java.lang.reflect.Field;
+
+/**
+ * Applies an {@link Injection} to a target field.
+ * 
+ * @author Henri Tremblay
+ * @author Alistair Todd
+ * @since 3.3
+ */
+public class InjectionTarget {
+
+    private final Field targetField;
+
+    /**
+     * Create instance for injection to the given field.
+     * @param f Field that will receive the {@link Injection}
+     */
+    public InjectionTarget(final Field f) {
+        this.targetField = f;
+    }
+
+    /**
+     * Can the given Injection be applied to this InjectionTarget?
+     * @param injection candidate Injection
+     * @return true if injection represents a mock that can be applied to this InjectionTarget,
+     * false if the mock is of a type that cannot be assigned
+     */
+    public boolean accepts(final Injection injection) {
+        return targetField.getType().isAssignableFrom(injection.getMock().getClass());
+    }
+
+    /**
+     * Perform the injection against the given object set the "matched" status of the injection when successful.
+     * @param obj Object instance on which to perform injection.
+     * @param injection Injection containing mock to assign.
+     */
+    public void inject(final Object obj, final Injection injection) {
+
+        targetField.setAccessible(true);
+
+        try {
+            targetField.set(obj, injection.getMock());
+        } catch (final IllegalAccessException e) {
+            // ///CLOVER:OFF
+            throw new RuntimeException(e);
+            // ///CLOVER:ON
+        }
+        injection.setMatched();
+    }
+
+    /**
+     * Get the field to which injections will be assigned.
+     * @return target field for injection assignment.
+     */
+    public Field getTargetField() {
+        return targetField;
+    }
+
+}
diff --git a/src/org/easymock/internal/Injector.java b/src/org/easymock/internal/Injector.java
new file mode 100644
index 0000000..cc391ba
--- /dev/null
+++ b/src/org/easymock/internal/Injector.java
@@ -0,0 +1,243 @@
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock.internal;
+
+import static java.util.Arrays.*;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.easymock.*;
+
+/**
+ * Performs creation of mocks and injection into test subjects in accordance with annotations present in the host object.
+ * 
+ * @author Henri Tremblay
+ * @author Alistair Todd
+ * @since 3.3
+ */
+public class Injector {
+
+    /**
+     * Inject a mock to every fields annotated with {@link Mock} on the class passed
+     * in parameter. Then, inject these mocks to the fields of every class annotated with {@link TestSubject}.
+     * <p>
+     * The rules are
+     * <ul>
+     *     <li>Static and final fields are ignored</li>
+     *     <li>If two mocks have the same field name, return an error</li>
+     *     <li>If a mock has a field name and no matching field is found, return an error</li>
+     * </ul>
+     * Then, ignoring all fields and mocks matched by field name
+     * <ul>
+     *     <li>If a mock without field name can be assigned to a field, do it. The same mock can be assigned more than once</li>
+     *     <li>If no mock can be assigned to a field, skip the field silently</li>
+     *     <li>If the mock cannot be assigned to any field, skip the mock silently</li>          
+     *     <li>If two mocks can be assigned to the same field, return an error</li>          
+     * </ul>
+     * Fields are searched recursively on the superclasses
+     * <p>
+     * <b>Note:</b> If the parameter extends {@link EasyMockSupport}, the mocks will be created using it to allow
+     * <code>replayAll/verifyAll</code> to work afterwards
+     * @param host the object on which to inject mocks
+     * @since 3.2
+     */
+    public static void injectMocks(final Object host) {
+
+        final InjectionPlan injectionPlan = new InjectionPlan();
+
+        Class<?> hostClass = host.getClass();
+        while (hostClass != Object.class) {
+            createMocksForAnnotations(hostClass, host, injectionPlan);
+            hostClass = hostClass.getSuperclass();
+        }
+
+        for (final Field f : injectionPlan.getTestSubjectFields()) {
+            f.setAccessible(true);
+            Object testSubject;
+            try {
+                testSubject = f.get(host);
+            } catch (final IllegalAccessException e) {
+                // ///CLOVER:OFF
+                throw new RuntimeException(e);
+                // ///CLOVER:ON
+            }
+            Class<?> testSubjectClass = testSubject.getClass();
+            while (testSubjectClass != Object.class) {
+                injectMocksOnClass(testSubjectClass, testSubject, injectionPlan);
+                testSubjectClass = testSubjectClass.getSuperclass();
+            }
+        }
+
+        // Check for unsatisfied qualified injections only after having scanned all TestSubjects and their superclasses
+        for (final Injection injection : injectionPlan.getQualifiedInjections()) {
+            if (!injection.isMatched()) {
+                throw new RuntimeException(
+                        String.format("Unsatisfied qualifier: '%s'", injection.getAnnotation().fieldName()));
+            }
+        }
+    }
+
+    /**
+     * Create the mocks and find the fields annotated with {@link TestSubject}
+     *
+     * @param hostClass class to search
+     * @param host object of the class
+     * @param injectionPlan output parameter where the created mocks andfields to inject are added
+     */
+    private static void createMocksForAnnotations(final Class<?> hostClass, final Object host,
+            final InjectionPlan injectionPlan) {
+        final Field[] fields = hostClass.getDeclaredFields();
+        for (final Field f : fields) {
+            final TestSubject ima = f.getAnnotation(TestSubject.class);
+            if (ima != null) {
+                injectionPlan.addTestSubjectField(f);
+                continue;
+            }
+            final Mock annotation = f.getAnnotation(Mock.class);
+            if (annotation == null) {
+                continue;
+            }
+            final Class<?> type = f.getType();
+            String name = annotation.name();
+            // Empty string means we are on the default value which we means no name (aka null) from the EasyMock point of view
+            name = (name.length() == 0 ? null : name);
+
+            final MockType mockType = annotation.type();
+            Object mock;
+            if (host instanceof EasyMockSupport) {
+                mock = ((EasyMockSupport) host).createMock(name, mockType, type);
+            }
+            else {
+                mock = EasyMock.createMock(name, mockType, type);
+            }
+            f.setAccessible(true);
+            try {
+                f.set(host, mock);
+            } catch (final IllegalAccessException e) {
+                // ///CLOVER:OFF
+                throw new RuntimeException(e);
+                // ///CLOVER:ON
+            }
+
+            injectionPlan.addInjection(new Injection(mock, annotation));
+        }
+    }
+
+    /**
+     * Try to inject a mock to every fields in the class
+     *
+     * @param clazz class where the fields are taken
+     * @param obj object being a instance of clazz
+     * @param injectionPlan details of possible mocks for injection
+     */
+    private static void injectMocksOnClass(final Class<?> clazz, final Object obj,
+            final InjectionPlan injectionPlan) {
+
+        final List<Field> fields = injectByName(clazz, obj, injectionPlan.getQualifiedInjections());
+        injectByType(obj, fields, injectionPlan.getUnqualifiedInjections());
+    }
+
+    private static List<Field> injectByName(final Class<?> clazz, final Object obj,
+            final List<Injection> qualifiedInjections) {
+
+        final List<Field> fields = fieldsOf(clazz);
+
+        for (final Injection injection : qualifiedInjections) {
+
+            final Field f = getFieldByName(clazz, injection.getQualifier());
+            final InjectionTarget target = injectionTargetWithField(f);
+            if (target == null) {
+                continue;
+            }
+
+            if (target.accepts(injection)) {
+                target.inject(obj, injection);
+                fields.remove(target.getTargetField());
+            }
+        }
+
+        return fields;
+    }
+
+    private static void injectByType(final Object obj, final List<Field> fields,
+            final List<Injection> injections) {
+
+        for (final Field f : fields) {
+
+            final InjectionTarget target = injectionTargetWithField(f);
+            if (target == null) {
+                continue;
+            }
+
+            final Injection toAssign = findUniqueAssignable(injections, target);
+            if (toAssign == null) {
+                continue;
+            }
+
+            target.inject(obj, toAssign);
+        }
+    }
+
+    private static List<Field> fieldsOf(final Class<?> clazz) {
+        final List<Field> fields = new ArrayList<Field>();
+        fields.addAll(asList(clazz.getDeclaredFields()));
+        return fields;
+    }
+
+    private static Field getFieldByName(final Class<?> clazz, final String fieldName) {
+        try {
+            return clazz.getDeclaredField(fieldName);
+        } catch (final NoSuchFieldException e) {
+            return null;
+        } catch (final SecurityException e) {
+            // ///CLOVER:OFF
+            return null;
+            // ///CLOVER:ON
+        }
+    }
+
+    private static InjectionTarget injectionTargetWithField(final Field f) {
+        if (shouldNotAssignTo(f)) {
+            return null;
+        }
+        return new InjectionTarget(f);
+    }
+
+    private static boolean shouldNotAssignTo(final Field f) {
+        // Skip final or static fields
+        return f == null || (f.getModifiers() & (Modifier.STATIC + Modifier.FINAL)) != 0;
+    }
+
+    private static Injection findUniqueAssignable(final List<Injection> injections,
+            final InjectionTarget target) {
+        Injection toAssign = null;
+        for (final Injection injection : injections) {
+            if (target.accepts(injection)) {
+                if (toAssign != null) {
+                    throw new RuntimeException(
+                            String.format("At least two mocks can be assigned to '%s': %s and %s",
+                                    target.getTargetField(), toAssign.getMock(), injection.getMock()));
+                }
+                toAssign = injection;
+            }
+        }
+        return toAssign;
+    }
+
+}
diff --git a/src/org/easymock/internal/Invocation.java b/src/org/easymock/internal/Invocation.java
index af754af..aaa5722 100644
--- a/src/org/easymock/internal/Invocation.java
+++ b/src/org/easymock/internal/Invocation.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/JavaProxyFactory.java b/src/org/easymock/internal/JavaProxyFactory.java
index 255d6f8..b0f8341 100644
--- a/src/org/easymock/internal/JavaProxyFactory.java
+++ b/src/org/easymock/internal/JavaProxyFactory.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/LastControl.java b/src/org/easymock/internal/LastControl.java
index 960932d..57d275e 100644
--- a/src/org/easymock/internal/LastControl.java
+++ b/src/org/easymock/internal/LastControl.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@ package org.easymock.internal;
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.Stack;
 
 import org.easymock.IArgumentMatcher;
 import org.easymock.internal.matchers.And;
@@ -34,9 +33,9 @@ public final class LastControl {
 
     private static final ThreadLocal<MocksControl> threadToControl = new ThreadLocal<MocksControl>();
 
-    private static final ThreadLocal<Stack<Invocation>> threadToCurrentInvocation = new ThreadLocal<Stack<Invocation>>();
+    private static final ThreadLocal<List<Invocation>> threadToCurrentInvocation = new ThreadLocal<List<Invocation>>();
 
-    private static final ThreadLocal<Stack<IArgumentMatcher>> threadToArgumentMatcherStack = new ThreadLocal<Stack<IArgumentMatcher>>();
+    private static final ThreadLocal<List<IArgumentMatcher>> threadToArgumentMatcherStack = new ThreadLocal<List<IArgumentMatcher>>();
 
     // ///CLOVER:OFF
     private LastControl() {
@@ -57,16 +56,16 @@ public final class LastControl {
     }
 
     public static void reportMatcher(final IArgumentMatcher matcher) {
-        Stack<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
+        List<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
         if (stack == null) {
-            stack = new Stack<IArgumentMatcher>();
+            stack = new ArrayList<IArgumentMatcher>(5); // methods of more than 5 parameters are quite rare
             threadToArgumentMatcherStack.set(stack);
         }
-        stack.push(matcher);
+        stack.add(matcher);
     }
 
     public static List<IArgumentMatcher> pullMatchers() {
-        final Stack<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
+        final List<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
         if (stack == null) {
             return null;
         }
@@ -75,25 +74,25 @@ public final class LastControl {
     }
 
     public static void reportAnd(final int count) {
-        final Stack<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
+        final List<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
         assertState(stack != null, NO_MATCHERS_FOUND);
-        stack.push(new And(popLastArgumentMatchers(count)));
+        stack.add(new And(popLastArgumentMatchers(count)));
     }
 
     public static void reportNot() {
-        final Stack<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
+        final List<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
         assertState(stack != null, NO_MATCHERS_FOUND);
-        stack.push(new Not(popLastArgumentMatchers(1).get(0)));
+        stack.add(new Not(popLastArgumentMatchers(1).get(0)));
     }
 
     private static List<IArgumentMatcher> popLastArgumentMatchers(final int count) {
-        final Stack<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
+        final List<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
         assertState(stack != null, NO_MATCHERS_FOUND);
         assertState(stack.size() >= count, "" + count + " matchers expected, " + stack.size() + " recorded.");
         final List<IArgumentMatcher> result = new LinkedList<IArgumentMatcher>();
         result.addAll(stack.subList(stack.size() - count, stack.size()));
         for (int i = 0; i < count; i++) {
-            stack.pop();
+            stack.remove(stack.size()-1);
         }
         return result;
     }
@@ -106,30 +105,30 @@ public final class LastControl {
     }
 
     public static void reportOr(final int count) {
-        final Stack<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
+        final List<IArgumentMatcher> stack = threadToArgumentMatcherStack.get();
         assertState(stack != null, NO_MATCHERS_FOUND);
-        stack.push(new Or(popLastArgumentMatchers(count)));
+        stack.add(new Or(popLastArgumentMatchers(count)));
     }
 
     public static Invocation getCurrentInvocation() {
-        final Stack<Invocation> stack = threadToCurrentInvocation.get();
-        if (stack == null || stack.empty()) {
+        final List<Invocation> stack = threadToCurrentInvocation.get();
+        if (stack == null || stack.isEmpty()) {
             return null;
         }
-        return stack.lastElement();
+        return stack.get(stack.size()-1);
     }
 
     public static void pushCurrentInvocation(final Invocation invocation) {
-        Stack<Invocation> stack = threadToCurrentInvocation.get();
+        List<Invocation> stack = threadToCurrentInvocation.get();
         if (stack == null) {
-            stack = new Stack<Invocation>();
+            stack = new ArrayList<Invocation>(2); // we will rarely have more than 1 recursion. So almost never over 2
             threadToCurrentInvocation.set(stack);
         }
-        stack.push(invocation);
+        stack.add(invocation);
     }
 
     public static void popCurrentInvocation() {
-        final Stack<Invocation> stack = threadToCurrentInvocation.get();
-        stack.pop();
+        final List<Invocation> stack = threadToCurrentInvocation.get();
+        stack.remove(stack.size()-1);
     }
 }
diff --git a/src/org/easymock/internal/MethodSerializationWrapper.java b/src/org/easymock/internal/MethodSerializationWrapper.java
index 853751a..080ba24 100644
--- a/src/org/easymock/internal/MethodSerializationWrapper.java
+++ b/src/org/easymock/internal/MethodSerializationWrapper.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/MockBuilder.java b/src/org/easymock/internal/MockBuilder.java
index 1fb3d52..77b5948 100644
--- a/src/org/easymock/internal/MockBuilder.java
+++ b/src/org/easymock/internal/MockBuilder.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/MockInvocationHandler.java b/src/org/easymock/internal/MockInvocationHandler.java
index 3355d37..abdfeb6 100644
--- a/src/org/easymock/internal/MockInvocationHandler.java
+++ b/src/org/easymock/internal/MockInvocationHandler.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/MocksBehavior.java b/src/org/easymock/internal/MocksBehavior.java
index f8a9a32..a2f9aa5 100644
--- a/src/org/easymock/internal/MocksBehavior.java
+++ b/src/org/easymock/internal/MocksBehavior.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/MocksControl.java b/src/org/easymock/internal/MocksControl.java
index e709dc4..131d22c 100644
--- a/src/org/easymock/internal/MocksControl.java
+++ b/src/org/easymock/internal/MocksControl.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,6 +29,21 @@ public class MocksControl implements IMocksControl, IExpectationSetters<Object>,
 
     private static final long serialVersionUID = 443604921336702014L;
 
+    /**
+     * Exactly one call.
+     */
+    public static final Range ONCE = new Range(1);
+
+    /**
+     * One or more calls.
+     */
+    public static final Range AT_LEAST_ONCE = new Range(1, Integer.MAX_VALUE);
+
+    /**
+     * Zero or more calls.
+     */
+    public static final Range ZERO_OR_MORE = new Range(0, Integer.MAX_VALUE);
+    
     /** lazily created; the proxy factory for classes */
     private static IProxyFactory classProxyFactory;
 
@@ -39,7 +54,7 @@ public class MocksControl implements IMocksControl, IExpectationSetters<Object>,
     private IMocksBehavior behavior;
 
     /**
-     * This class was kept here for compabitility reason with frameworks using EasyMock
+     * This class was kept here for compatibility reason with frameworks using EasyMock
      * @deprecated Use org.easymock.MockType
      */
     @Deprecated
@@ -289,6 +304,15 @@ public class MocksControl implements IMocksControl, IExpectationSetters<Object>,
         }
     }
 
+    public IExpectationSetters<Object> andVoid() {
+        try {
+            state.andVoid();
+            return this;
+        } catch (final RuntimeExceptionWrapper e) {
+            throw (RuntimeException) e.getRuntimeException().fillInStackTrace();
+        }
+    }
+
     public void andStubReturn(final Object value) {
         try {
             state.andStubReturn(value);
@@ -374,19 +398,4 @@ public class MocksControl implements IMocksControl, IExpectationSetters<Object>,
         }
     }
 
-    /**
-     * Exactly one call.
-     */
-    public static final Range ONCE = new Range(1);
-
-    /**
-     * One or more calls.
-     */
-    public static final Range AT_LEAST_ONCE = new Range(1, Integer.MAX_VALUE);
-
-    /**
-     * Zero or more calls.
-     */
-    public static final Range ZERO_OR_MORE = new Range(0, Integer.MAX_VALUE);
-
 }
diff --git a/src/org/easymock/internal/ObjectMethodsFilter.java b/src/org/easymock/internal/ObjectMethodsFilter.java
index 0384896..d1dab0c 100644
--- a/src/org/easymock/internal/ObjectMethodsFilter.java
+++ b/src/org/easymock/internal/ObjectMethodsFilter.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ObjenesisClassInstantiator.java b/src/org/easymock/internal/ObjenesisClassInstantiator.java
index a3a5d81..1006f93 100644
--- a/src/org/easymock/internal/ObjenesisClassInstantiator.java
+++ b/src/org/easymock/internal/ObjenesisClassInstantiator.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/Range.java b/src/org/easymock/internal/Range.java
index 98e2742..4e335d4 100644
--- a/src/org/easymock/internal/Range.java
+++ b/src/org/easymock/internal/Range.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/RecordState.java b/src/org/easymock/internal/RecordState.java
index 7d767f9..085732f 100644
--- a/src/org/easymock/internal/RecordState.java
+++ b/src/org/easymock/internal/RecordState.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -129,6 +129,15 @@ public class RecordState implements IMocksControlState, Serializable {
         lastResult = Result.createDelegatingResult(delegateTo);
     }
 
+    public void andVoid() {
+        requireMethodCall("void");
+        requireVoidMethod();
+        if (lastResult != null) {
+            times(MocksControl.ONCE);
+        }
+        lastResult = Result.createReturnResult(null);
+    }
+
     public void andStubReturn(Object value) {
         requireMethodCall("stub return value");
         value = convertNumberClassIfNeccessary(value);
diff --git a/src/org/easymock/internal/ReflectionUtils.java b/src/org/easymock/internal/ReflectionUtils.java
index 8d62b4b..010bcb8 100644
--- a/src/org/easymock/internal/ReflectionUtils.java
+++ b/src/org/easymock/internal/ReflectionUtils.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ReplayState.java b/src/org/easymock/internal/ReplayState.java
index e073d48..7f6212c 100644
--- a/src/org/easymock/internal/ReplayState.java
+++ b/src/org/easymock/internal/ReplayState.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -109,6 +109,10 @@ public class ReplayState implements IMocksControlState, Serializable {
         throwWrappedIllegalStateException();
     }
 
+    public void andVoid() {
+        throwWrappedIllegalStateException();
+    }
+
     public void andStubReturn(final Object value) {
         throwWrappedIllegalStateException();
     }
diff --git a/src/org/easymock/internal/Result.java b/src/org/easymock/internal/Result.java
index 4c82b2d..095aec4 100644
--- a/src/org/easymock/internal/Result.java
+++ b/src/org/easymock/internal/Result.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/Results.java b/src/org/easymock/internal/Results.java
index d560c15..dce34f0 100644
--- a/src/org/easymock/internal/Results.java
+++ b/src/org/easymock/internal/Results.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/RuntimeExceptionWrapper.java b/src/org/easymock/internal/RuntimeExceptionWrapper.java
index a5e1e3e..7c37e4c 100644
--- a/src/org/easymock/internal/RuntimeExceptionWrapper.java
+++ b/src/org/easymock/internal/RuntimeExceptionWrapper.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/ThrowableWrapper.java b/src/org/easymock/internal/ThrowableWrapper.java
index 35f9aa0..7149246 100644
--- a/src/org/easymock/internal/ThrowableWrapper.java
+++ b/src/org/easymock/internal/ThrowableWrapper.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/UnorderedBehavior.java b/src/org/easymock/internal/UnorderedBehavior.java
index 0dc161e..1d38625 100644
--- a/src/org/easymock/internal/UnorderedBehavior.java
+++ b/src/org/easymock/internal/UnorderedBehavior.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/And.java b/src/org/easymock/internal/matchers/And.java
index 3c3788e..4decbad 100644
--- a/src/org/easymock/internal/matchers/And.java
+++ b/src/org/easymock/internal/matchers/And.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Any.java b/src/org/easymock/internal/matchers/Any.java
index 192ded5..4764b80 100644
--- a/src/org/easymock/internal/matchers/Any.java
+++ b/src/org/easymock/internal/matchers/Any.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/ArrayEquals.java b/src/org/easymock/internal/matchers/ArrayEquals.java
index 1c77a43..3297d68 100644
--- a/src/org/easymock/internal/matchers/ArrayEquals.java
+++ b/src/org/easymock/internal/matchers/ArrayEquals.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Captures.java b/src/org/easymock/internal/matchers/Captures.java
index 3716654..169e49a 100644
--- a/src/org/easymock/internal/matchers/Captures.java
+++ b/src/org/easymock/internal/matchers/Captures.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Compare.java b/src/org/easymock/internal/matchers/Compare.java
index 1bb6974..160609b 100644
--- a/src/org/easymock/internal/matchers/Compare.java
+++ b/src/org/easymock/internal/matchers/Compare.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/CompareEqual.java b/src/org/easymock/internal/matchers/CompareEqual.java
index 79fefc2..e52e9b2 100644
--- a/src/org/easymock/internal/matchers/CompareEqual.java
+++ b/src/org/easymock/internal/matchers/CompareEqual.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/CompareTo.java b/src/org/easymock/internal/matchers/CompareTo.java
index 41b99c5..1e26fa2 100644
--- a/src/org/easymock/internal/matchers/CompareTo.java
+++ b/src/org/easymock/internal/matchers/CompareTo.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Contains.java b/src/org/easymock/internal/matchers/Contains.java
index be2ad00..c580636 100644
--- a/src/org/easymock/internal/matchers/Contains.java
+++ b/src/org/easymock/internal/matchers/Contains.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/EndsWith.java b/src/org/easymock/internal/matchers/EndsWith.java
index b462723..0a65889 100644
--- a/src/org/easymock/internal/matchers/EndsWith.java
+++ b/src/org/easymock/internal/matchers/EndsWith.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Equals.java b/src/org/easymock/internal/matchers/Equals.java
index 152af1b..e7fca82 100644
--- a/src/org/easymock/internal/matchers/Equals.java
+++ b/src/org/easymock/internal/matchers/Equals.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/EqualsWithDelta.java b/src/org/easymock/internal/matchers/EqualsWithDelta.java
index c50e646..0808bf6 100644
--- a/src/org/easymock/internal/matchers/EqualsWithDelta.java
+++ b/src/org/easymock/internal/matchers/EqualsWithDelta.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Find.java b/src/org/easymock/internal/matchers/Find.java
index 9d0ba34..bdd9e41 100644
--- a/src/org/easymock/internal/matchers/Find.java
+++ b/src/org/easymock/internal/matchers/Find.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/GreaterOrEqual.java b/src/org/easymock/internal/matchers/GreaterOrEqual.java
index b77eb34..1330c54 100644
--- a/src/org/easymock/internal/matchers/GreaterOrEqual.java
+++ b/src/org/easymock/internal/matchers/GreaterOrEqual.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/GreaterThan.java b/src/org/easymock/internal/matchers/GreaterThan.java
index 052cd02..357a14b 100644
--- a/src/org/easymock/internal/matchers/GreaterThan.java
+++ b/src/org/easymock/internal/matchers/GreaterThan.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/InstanceOf.java b/src/org/easymock/internal/matchers/InstanceOf.java
index 088befe..e379561 100644
--- a/src/org/easymock/internal/matchers/InstanceOf.java
+++ b/src/org/easymock/internal/matchers/InstanceOf.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/LessOrEqual.java b/src/org/easymock/internal/matchers/LessOrEqual.java
index 70efe26..efd3852 100644
--- a/src/org/easymock/internal/matchers/LessOrEqual.java
+++ b/src/org/easymock/internal/matchers/LessOrEqual.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/LessThan.java b/src/org/easymock/internal/matchers/LessThan.java
index 5fc217a..93bdd29 100644
--- a/src/org/easymock/internal/matchers/LessThan.java
+++ b/src/org/easymock/internal/matchers/LessThan.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Matches.java b/src/org/easymock/internal/matchers/Matches.java
index d33d05e..f2c4885 100644
--- a/src/org/easymock/internal/matchers/Matches.java
+++ b/src/org/easymock/internal/matchers/Matches.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Not.java b/src/org/easymock/internal/matchers/Not.java
index efb46ec..17d86c3 100644
--- a/src/org/easymock/internal/matchers/Not.java
+++ b/src/org/easymock/internal/matchers/Not.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/NotNull.java b/src/org/easymock/internal/matchers/NotNull.java
index dae6992..5c6fd79 100644
--- a/src/org/easymock/internal/matchers/NotNull.java
+++ b/src/org/easymock/internal/matchers/NotNull.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Null.java b/src/org/easymock/internal/matchers/Null.java
index ed1a430..d20ae5e 100644
--- a/src/org/easymock/internal/matchers/Null.java
+++ b/src/org/easymock/internal/matchers/Null.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Or.java b/src/org/easymock/internal/matchers/Or.java
index ea2f839..1fb11da 100644
--- a/src/org/easymock/internal/matchers/Or.java
+++ b/src/org/easymock/internal/matchers/Or.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/Same.java b/src/org/easymock/internal/matchers/Same.java
index 4335573..72d2293 100644
--- a/src/org/easymock/internal/matchers/Same.java
+++ b/src/org/easymock/internal/matchers/Same.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/src/org/easymock/internal/matchers/StartsWith.java b/src/org/easymock/internal/matchers/StartsWith.java
index 84cf1f8..016c5c0 100644
--- a/src/org/easymock/internal/matchers/StartsWith.java
+++ b/src/org/easymock/internal/matchers/StartsWith.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/ArgumentToStringTest.java b/tests/org/easymock/tests/ArgumentToStringTest.java
index bdd9719..7a2c4d4 100644
--- a/tests/org/easymock/tests/ArgumentToStringTest.java
+++ b/tests/org/easymock/tests/ArgumentToStringTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/BaseEasyMockRunnerTest.java b/tests/org/easymock/tests/BaseEasyMockRunnerTest.java
index 2370276..7eddaae 100644
--- a/tests/org/easymock/tests/BaseEasyMockRunnerTest.java
+++ b/tests/org/easymock/tests/BaseEasyMockRunnerTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/CapturesMatcherTest.java b/tests/org/easymock/tests/CapturesMatcherTest.java
index 0837da7..54b92f3 100644
--- a/tests/org/easymock/tests/CapturesMatcherTest.java
+++ b/tests/org/easymock/tests/CapturesMatcherTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/CglibTest.java b/tests/org/easymock/tests/CglibTest.java
index 09a5424..3016998 100644
--- a/tests/org/easymock/tests/CglibTest.java
+++ b/tests/org/easymock/tests/CglibTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,6 +23,8 @@ import net.sf.cglib.proxy.*;
 import org.easymock.internal.ClassInstantiatorFactory;
 import org.junit.Test;
 
+import static org.junit.Assert.assertNotSame;
+
 /**
  * This test case is used to make sure that the way cglib is used is providing
  * the expected behavior
@@ -34,15 +36,14 @@ public class CglibTest {
     /**
      * Check that an interceptor is used by only one instance of a class
      * 
-     * @throws Exception
+     * @throws Exception just a test
      */
     @Test
     public void test() throws Exception {
+        final Factory f1 = createMock();
+        final Factory f2 = createMock();
 
-//        final Factory f1 = createMock();
-//        final Factory f2 = createMock();
-//
-//        assertNotSame(f1.getCallback(0), f2.getCallback(0));
+        assertNotSame(f1.getCallback(0), f2.getCallback(0));
     }
 
     private Factory createMock() throws Exception {
diff --git a/tests/org/easymock/tests/ClassInstantiatorFactoryTest.java b/tests/org/easymock/tests/ClassInstantiatorFactoryTest.java
index dbf3b17..be91139 100644
--- a/tests/org/easymock/tests/ClassInstantiatorFactoryTest.java
+++ b/tests/org/easymock/tests/ClassInstantiatorFactoryTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/ConstructorTest.java b/tests/org/easymock/tests/ConstructorTest.java
index eca1921..acf798d 100644
--- a/tests/org/easymock/tests/ConstructorTest.java
+++ b/tests/org/easymock/tests/ConstructorTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/DefaultClassInstantiatorTest.java b/tests/org/easymock/tests/DefaultClassInstantiatorTest.java
index 7945f78..451fbf4 100644
--- a/tests/org/easymock/tests/DefaultClassInstantiatorTest.java
+++ b/tests/org/easymock/tests/DefaultClassInstantiatorTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/ErrorMessageTest.java b/tests/org/easymock/tests/ErrorMessageTest.java
index 949d825..f25fb99 100644
--- a/tests/org/easymock/tests/ErrorMessageTest.java
+++ b/tests/org/easymock/tests/ErrorMessageTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/ExpectedMethodCallTest.java b/tests/org/easymock/tests/ExpectedMethodCallTest.java
index a27a972..7007504 100644
--- a/tests/org/easymock/tests/ExpectedMethodCallTest.java
+++ b/tests/org/easymock/tests/ExpectedMethodCallTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/GenericTest.java b/tests/org/easymock/tests/GenericTest.java
index e8ed17c..60b8158 100644
--- a/tests/org/easymock/tests/GenericTest.java
+++ b/tests/org/easymock/tests/GenericTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/IMethods.java b/tests/org/easymock/tests/IMethods.java
index f273f2a..fd42bf1 100644
--- a/tests/org/easymock/tests/IMethods.java
+++ b/tests/org/easymock/tests/IMethods.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/IVarArgs.java b/tests/org/easymock/tests/IVarArgs.java
index 4f46347..00841c4 100644
--- a/tests/org/easymock/tests/IVarArgs.java
+++ b/tests/org/easymock/tests/IVarArgs.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/InvocationTest.java b/tests/org/easymock/tests/InvocationTest.java
index c5de015..597f551 100644
--- a/tests/org/easymock/tests/InvocationTest.java
+++ b/tests/org/easymock/tests/InvocationTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/LimitationsTest.java b/tests/org/easymock/tests/LimitationsTest.java
index 396e24b..4fae110 100644
--- a/tests/org/easymock/tests/LimitationsTest.java
+++ b/tests/org/easymock/tests/LimitationsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/MatchableArgumentsTest.java b/tests/org/easymock/tests/MatchableArgumentsTest.java
index 6955350..39b51aa 100644
--- a/tests/org/easymock/tests/MatchableArgumentsTest.java
+++ b/tests/org/easymock/tests/MatchableArgumentsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/MethodSerializationWrapperTest.java b/tests/org/easymock/tests/MethodSerializationWrapperTest.java
index a84f187..fd7b771 100644
--- a/tests/org/easymock/tests/MethodSerializationWrapperTest.java
+++ b/tests/org/easymock/tests/MethodSerializationWrapperTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/MockClassControlTest.java b/tests/org/easymock/tests/MockClassControlTest.java
index 291c20b..98379ca 100644
--- a/tests/org/easymock/tests/MockClassControlTest.java
+++ b/tests/org/easymock/tests/MockClassControlTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/MockNameTest.java b/tests/org/easymock/tests/MockNameTest.java
index b3c1a3e..ad06f38 100644
--- a/tests/org/easymock/tests/MockNameTest.java
+++ b/tests/org/easymock/tests/MockNameTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/MockTypeTest.java b/tests/org/easymock/tests/MockTypeTest.java
index 496e08b..220e893 100644
--- a/tests/org/easymock/tests/MockTypeTest.java
+++ b/tests/org/easymock/tests/MockTypeTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/MockingTest.java b/tests/org/easymock/tests/MockingTest.java
index 9867a1e..ea242e4 100644
--- a/tests/org/easymock/tests/MockingTest.java
+++ b/tests/org/easymock/tests/MockingTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/NiceMockControlLongCompatibleReturnValueTest.java b/tests/org/easymock/tests/NiceMockControlLongCompatibleReturnValueTest.java
index 4cc8bcf..adc65c9 100644
--- a/tests/org/easymock/tests/NiceMockControlLongCompatibleReturnValueTest.java
+++ b/tests/org/easymock/tests/NiceMockControlLongCompatibleReturnValueTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/NiceMockControlTest.java b/tests/org/easymock/tests/NiceMockControlTest.java
index a08a27d..a32be24 100644
--- a/tests/org/easymock/tests/NiceMockControlTest.java
+++ b/tests/org/easymock/tests/NiceMockControlTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/ObjectMethodsTest.java b/tests/org/easymock/tests/ObjectMethodsTest.java
index d6a378d..6ca1518 100644
--- a/tests/org/easymock/tests/ObjectMethodsTest.java
+++ b/tests/org/easymock/tests/ObjectMethodsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateInvalidDefaultReturnValueTest.java b/tests/org/easymock/tests/RecordStateInvalidDefaultReturnValueTest.java
index e055c08..2ea842e 100644
--- a/tests/org/easymock/tests/RecordStateInvalidDefaultReturnValueTest.java
+++ b/tests/org/easymock/tests/RecordStateInvalidDefaultReturnValueTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateInvalidDefaultThrowableTest.java b/tests/org/easymock/tests/RecordStateInvalidDefaultThrowableTest.java
index dacb4b9..da989f8 100644
--- a/tests/org/easymock/tests/RecordStateInvalidDefaultThrowableTest.java
+++ b/tests/org/easymock/tests/RecordStateInvalidDefaultThrowableTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateInvalidRangeTest.java b/tests/org/easymock/tests/RecordStateInvalidRangeTest.java
index 608b009..5b05e99 100644
--- a/tests/org/easymock/tests/RecordStateInvalidRangeTest.java
+++ b/tests/org/easymock/tests/RecordStateInvalidRangeTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateInvalidReturnValueTest.java b/tests/org/easymock/tests/RecordStateInvalidReturnValueTest.java
index 5a0940d..ca9a0be 100644
--- a/tests/org/easymock/tests/RecordStateInvalidReturnValueTest.java
+++ b/tests/org/easymock/tests/RecordStateInvalidReturnValueTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateInvalidStateChangeTest.java b/tests/org/easymock/tests/RecordStateInvalidStateChangeTest.java
index d81addb..515f19f 100644
--- a/tests/org/easymock/tests/RecordStateInvalidStateChangeTest.java
+++ b/tests/org/easymock/tests/RecordStateInvalidStateChangeTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateInvalidThrowableTest.java b/tests/org/easymock/tests/RecordStateInvalidThrowableTest.java
index a763c6c..b2b0498 100644
--- a/tests/org/easymock/tests/RecordStateInvalidThrowableTest.java
+++ b/tests/org/easymock/tests/RecordStateInvalidThrowableTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateInvalidUsageTest.java b/tests/org/easymock/tests/RecordStateInvalidUsageTest.java
index bb3f3d9..9980dac 100644
--- a/tests/org/easymock/tests/RecordStateInvalidUsageTest.java
+++ b/tests/org/easymock/tests/RecordStateInvalidUsageTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/RecordStateMethodCallMissingTest.java b/tests/org/easymock/tests/RecordStateMethodCallMissingTest.java
index 15e2adf..5c1e134 100644
--- a/tests/org/easymock/tests/RecordStateMethodCallMissingTest.java
+++ b/tests/org/easymock/tests/RecordStateMethodCallMissingTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -296,4 +296,14 @@ public class RecordStateMethodCallMissingTest {
         }
     }
 
+    @Test
+    public void andVoidWithNonVoidMethod() {
+        mock.booleanReturningMethod(1);
+        try {
+            expectLastCall().andVoid();
+            fail();
+        } catch (final IllegalStateException expected) {
+            assertEquals("last method called on mock is not a void method", expected.getMessage());
+        }
+    }
 }
diff --git a/tests/org/easymock/tests/ReplayStateInvalidCallsTest.java b/tests/org/easymock/tests/ReplayStateInvalidCallsTest.java
index 0f13f62..0f40feb 100644
--- a/tests/org/easymock/tests/ReplayStateInvalidCallsTest.java
+++ b/tests/org/easymock/tests/ReplayStateInvalidCallsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -131,6 +131,11 @@ public class ReplayStateInvalidCallsTest {
     }
 
     @Test(expected = RuntimeExceptionWrapper.class)
+    public void andVoid() {
+        control.andVoid();
+    }
+
+    @Test(expected = RuntimeExceptionWrapper.class)
     public void andDelegateTo() {
         control.andDelegateTo(null);
     }
diff --git a/tests/org/easymock/tests/ReplayStateInvalidUsageTest.java b/tests/org/easymock/tests/ReplayStateInvalidUsageTest.java
index af57082..f4cfc80 100644
--- a/tests/org/easymock/tests/ReplayStateInvalidUsageTest.java
+++ b/tests/org/easymock/tests/ReplayStateInvalidUsageTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/ResultTest.java b/tests/org/easymock/tests/ResultTest.java
index cc06d03..b4df790 100644
--- a/tests/org/easymock/tests/ResultTest.java
+++ b/tests/org/easymock/tests/ResultTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/StacktraceTest.java b/tests/org/easymock/tests/StacktraceTest.java
index ea12276..af73112 100644
--- a/tests/org/easymock/tests/StacktraceTest.java
+++ b/tests/org/easymock/tests/StacktraceTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageCallCountTest.java b/tests/org/easymock/tests/UsageCallCountTest.java
index f265063..d8fa7ad 100644
--- a/tests/org/easymock/tests/UsageCallCountTest.java
+++ b/tests/org/easymock/tests/UsageCallCountTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageDefaultReturnValueTest.java b/tests/org/easymock/tests/UsageDefaultReturnValueTest.java
index 3e14f41..bfbc9a2 100644
--- a/tests/org/easymock/tests/UsageDefaultReturnValueTest.java
+++ b/tests/org/easymock/tests/UsageDefaultReturnValueTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageExpectAndDefaultReturnTest.java b/tests/org/easymock/tests/UsageExpectAndDefaultReturnTest.java
index 1382a46..6fa6bb5 100644
--- a/tests/org/easymock/tests/UsageExpectAndDefaultReturnTest.java
+++ b/tests/org/easymock/tests/UsageExpectAndDefaultReturnTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageExpectAndDefaultThrowTest.java b/tests/org/easymock/tests/UsageExpectAndDefaultThrowTest.java
index 70e376f..70e3bad 100644
--- a/tests/org/easymock/tests/UsageExpectAndDefaultThrowTest.java
+++ b/tests/org/easymock/tests/UsageExpectAndDefaultThrowTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageExpectAndReturnTest.java b/tests/org/easymock/tests/UsageExpectAndReturnTest.java
index 08236bc..db78639 100644
--- a/tests/org/easymock/tests/UsageExpectAndReturnTest.java
+++ b/tests/org/easymock/tests/UsageExpectAndReturnTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageExpectAndThrowTest.java b/tests/org/easymock/tests/UsageExpectAndThrowTest.java
index 891b010..dd3ecd5 100644
--- a/tests/org/easymock/tests/UsageExpectAndThrowTest.java
+++ b/tests/org/easymock/tests/UsageExpectAndThrowTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageFloatingPointReturnValueTest.java b/tests/org/easymock/tests/UsageFloatingPointReturnValueTest.java
index 6204362..3e5d7e0 100644
--- a/tests/org/easymock/tests/UsageFloatingPointReturnValueTest.java
+++ b/tests/org/easymock/tests/UsageFloatingPointReturnValueTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageLongCompatibleReturnValueTest.java b/tests/org/easymock/tests/UsageLongCompatibleReturnValueTest.java
index 0e1fc19..2361100 100644
--- a/tests/org/easymock/tests/UsageLongCompatibleReturnValueTest.java
+++ b/tests/org/easymock/tests/UsageLongCompatibleReturnValueTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageOverloadedDefaultValueTest.java b/tests/org/easymock/tests/UsageOverloadedDefaultValueTest.java
index 47b65a3..9e5ac64 100644
--- a/tests/org/easymock/tests/UsageOverloadedDefaultValueTest.java
+++ b/tests/org/easymock/tests/UsageOverloadedDefaultValueTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageOverloadedMethodTest.java b/tests/org/easymock/tests/UsageOverloadedMethodTest.java
index 46ae595..c0c9bc4 100644
--- a/tests/org/easymock/tests/UsageOverloadedMethodTest.java
+++ b/tests/org/easymock/tests/UsageOverloadedMethodTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageRangeTest.java b/tests/org/easymock/tests/UsageRangeTest.java
index af38f74..7c8e038 100644
--- a/tests/org/easymock/tests/UsageRangeTest.java
+++ b/tests/org/easymock/tests/UsageRangeTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageStrictMockTest.java b/tests/org/easymock/tests/UsageStrictMockTest.java
index 2d0d3bf..2e3f66a 100644
--- a/tests/org/easymock/tests/UsageStrictMockTest.java
+++ b/tests/org/easymock/tests/UsageStrictMockTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageTest.java b/tests/org/easymock/tests/UsageTest.java
index 89571ee..8afd74a 100644
--- a/tests/org/easymock/tests/UsageTest.java
+++ b/tests/org/easymock/tests/UsageTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package org.easymock.tests;
 import static org.easymock.EasyMock.*;
 import static org.junit.Assert.*;
 
+import org.easymock.IAnswer;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -204,4 +205,44 @@ public class UsageTest {
 
     }
 
+    @Test
+    public void chainVoidMethodCalls() {
+        mock.simpleMethodWithArgument("4");
+        expectLastCall().andThrow(new RuntimeException("Test")).andVoid();
+        replay(mock);
+        try {
+            mock.simpleMethodWithArgument("4");
+        }
+        catch(RuntimeException e) {
+            assertEquals("Test", e.getMessage());
+        }
+        mock.simpleMethodWithArgument("4");
+        verify(mock);
+    }
+
+    @Test
+    public void chainVoidMethodCallsVoidFirst() {
+        mock.simpleMethodWithArgument("4");
+        expectLastCall().andVoid().andThrow(new RuntimeException("Test"));
+        replay(mock);
+        mock.simpleMethodWithArgument("4");
+        try {
+            mock.simpleMethodWithArgument("4");
+        }
+        catch(RuntimeException e) {
+            assertEquals("Test", e.getMessage());
+        }
+        verify(mock);
+    }
+
+    @Test
+    public void chainVoidWithItself() {
+        mock.simpleMethodWithArgument("4");
+        expectLastCall().andVoid().times(2).andVoid();
+        replay(mock);
+        mock.simpleMethodWithArgument("4");
+        mock.simpleMethodWithArgument("4");
+        mock.simpleMethodWithArgument("4");
+        verify(mock);
+    }
 }
\ No newline at end of file
diff --git a/tests/org/easymock/tests/UsageThrowableTest.java b/tests/org/easymock/tests/UsageThrowableTest.java
index 503189b..35b3091 100644
--- a/tests/org/easymock/tests/UsageThrowableTest.java
+++ b/tests/org/easymock/tests/UsageThrowableTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageUnorderedTest.java b/tests/org/easymock/tests/UsageUnorderedTest.java
index 86d442f..4ef3faa 100644
--- a/tests/org/easymock/tests/UsageUnorderedTest.java
+++ b/tests/org/easymock/tests/UsageUnorderedTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageVarargTest.java b/tests/org/easymock/tests/UsageVarargTest.java
index 89a83b3..040f59d 100644
--- a/tests/org/easymock/tests/UsageVarargTest.java
+++ b/tests/org/easymock/tests/UsageVarargTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/UsageVerifyTest.java b/tests/org/easymock/tests/UsageVerifyTest.java
index ff88154..9756473 100644
--- a/tests/org/easymock/tests/UsageVerifyTest.java
+++ b/tests/org/easymock/tests/UsageVerifyTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests/Util.java b/tests/org/easymock/tests/Util.java
index ae8e8da..3e4ef8a 100644
--- a/tests/org/easymock/tests/Util.java
+++ b/tests/org/easymock/tests/Util.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/AnswerTest.java b/tests/org/easymock/tests2/AnswerTest.java
index a187654..a1a865f 100644
--- a/tests/org/easymock/tests2/AnswerTest.java
+++ b/tests/org/easymock/tests2/AnswerTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/CallbackAndArgumentsTest.java b/tests/org/easymock/tests2/CallbackAndArgumentsTest.java
index efc9b6b..68c6ac1 100644
--- a/tests/org/easymock/tests2/CallbackAndArgumentsTest.java
+++ b/tests/org/easymock/tests2/CallbackAndArgumentsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/CallbackTest.java b/tests/org/easymock/tests2/CallbackTest.java
index 3cc5c36..20f6e11 100644
--- a/tests/org/easymock/tests2/CallbackTest.java
+++ b/tests/org/easymock/tests2/CallbackTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/CaptureTest.java b/tests/org/easymock/tests2/CaptureTest.java
index 77ad82e..a012c19 100644
--- a/tests/org/easymock/tests2/CaptureTest.java
+++ b/tests/org/easymock/tests2/CaptureTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,7 +18,9 @@ package org.easymock.tests2;
 import static org.easymock.EasyMock.*;
 import static org.junit.Assert.*;
 
+import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 
 import org.easymock.Capture;
 import org.easymock.CaptureType;
@@ -48,7 +50,7 @@ public class CaptureTest {
 
     private Capture<Integer> testCaptureType(final CaptureType type) {
         final IMethods mock = createMock(IMethods.class);
-        final Capture<Integer> captured = new Capture<Integer>(type);
+        final Capture<Integer> captured = Capture.newInstance(type);
 
         expect(mock.oneArg(captureInt(captured))).andReturn("1");
         expect(mock.oneArg(anyInt())).andReturn("1");
@@ -99,7 +101,7 @@ public class CaptureTest {
 
     @Test
     public void testCaptureRightOne() {
-        final Capture<String> captured = new Capture<String>();
+        final Capture<String> captured = Capture.newInstance();
         final IMethods mock = createMock(IMethods.class);
 
         expect(mock.oneArg(and(eq("test"), capture(captured)))).andReturn("answer1");
@@ -118,7 +120,7 @@ public class CaptureTest {
 
     @Test
     public void testPrimitiveVsObject() {
-        final Capture<Integer> capture = new Capture<Integer>();
+        final Capture<Integer> capture = Capture.newInstance();
         final IMethods mock = createMock(IMethods.class);
 
         expect(mock.oneArg(captureInt(capture))).andReturn("answer");
@@ -137,7 +139,7 @@ public class CaptureTest {
 
     @Test
     public void testAnd() {
-        final Capture<String> captured = new Capture<String>();
+        final Capture<String> captured = Capture.newInstance();
         final IMethods mock = createMock(IMethods.class);
 
         expect(mock.oneArg(and(capture(captured), eq("test")))).andReturn("answer");
@@ -152,13 +154,13 @@ public class CaptureTest {
 
     @Test
     public void testPrimitive() {
-        final Capture<Integer> captureI = new Capture<Integer>();
-        final Capture<Long> captureL = new Capture<Long>();
-        final Capture<Float> captureF = new Capture<Float>();
-        final Capture<Double> captureD = new Capture<Double>();
-        final Capture<Byte> captureB = new Capture<Byte>();
-        final Capture<Character> captureC = new Capture<Character>();
-        final Capture<Boolean> captureBool = new Capture<Boolean>();
+        final Capture<Integer> captureI = Capture.newInstance();
+        final Capture<Long> captureL = Capture.newInstance();
+        final Capture<Float> captureF = Capture.newInstance();
+        final Capture<Double> captureD = Capture.newInstance();
+        final Capture<Byte> captureB = Capture.newInstance();
+        final Capture<Character> captureC = Capture.newInstance();
+        final Capture<Boolean> captureBool = Capture.newInstance();
 
         final IMethods mock = createMock(IMethods.class);
 
@@ -193,7 +195,7 @@ public class CaptureTest {
 
     @Test
     public void testCapture() {
-        final Capture<String> capture = new Capture<String>();
+        final Capture<String> capture = Capture.newInstance();
         assertFalse(capture.hasCaptured());
         try {
             capture.getValue();
@@ -223,7 +225,7 @@ public class CaptureTest {
 
     @Test
     public void testCaptureMultiple() {
-        final Capture<String> capture = new Capture<String>(CaptureType.ALL);
+        final Capture<String> capture = Capture.newInstance(CaptureType.ALL);
         capture.setValue("a");
         capture.setValue("b");
         try {
@@ -240,10 +242,10 @@ public class CaptureTest {
 
         final IMethods mock = createMock(IMethods.class);
 
-        final Capture<String> cap1 = new Capture<String>();
-        final Capture<String> cap2 = new Capture<String>();
-        final Capture<String> cap3 = new Capture<String>();
-        final Capture<String> cap4 = new Capture<String>();
+        final Capture<String> cap1 = Capture.newInstance();
+        final Capture<String> cap2 = Capture.newInstance();
+        final Capture<String> cap3 = Capture.newInstance();
+        final Capture<String> cap4 = Capture.newInstance();
 
         mock.simpleMethodWithArgument(and(isA(String.class), capture(cap1)));
         mock.simpleMethodWithArgument(and(isA(String.class), capture(cap2)));
@@ -277,8 +279,8 @@ public class CaptureTest {
     }
 
     protected void testCaptureHelper(final IMethods mock) {
-        final Capture<String> capture1 = new Capture<String>();
-        final Capture<String> capture2 = new Capture<String>();
+        final Capture<String> capture1 = Capture.newInstance();
+        final Capture<String> capture2 = Capture.newInstance();
 
         mock.simpleMethodWithArgument(capture(capture1));
         mock.simpleMethodWithArgument(capture(capture2));
@@ -295,9 +297,9 @@ public class CaptureTest {
 
     @Test
     public void testCapture1_2446744() {
-        final Capture<String> capture1 = new Capture<String>();
-        final Capture<String> capture2 = new Capture<String>();
-        final Capture<String> capture3 = new Capture<String>();
+        final Capture<String> capture1 = Capture.newInstance();
+        final Capture<String> capture2 = Capture.newInstance();
+        final Capture<String> capture3 = Capture.newInstance();
         final IMethods mock = createMock(IMethods.class);
         expect(mock.oneArg(capture(capture1))).andReturn("1").once();
         expect(mock.oneArg(capture(capture2))).andReturn("2").once();
@@ -317,7 +319,7 @@ public class CaptureTest {
 
     @Test
     public void testCapture2_2446744() {
-        final Capture<String> capture = new Capture<String>(CaptureType.ALL);
+        final Capture<String> capture = Capture.newInstance(CaptureType.ALL);
         final IMethods mock = createMock(IMethods.class);
         expect(mock.oneArg(capture(capture))).andReturn("1").once();
         expect(mock.oneArg(capture(capture))).andReturn("2").once();
@@ -335,7 +337,7 @@ public class CaptureTest {
 
     @Test
     public void testCaptureFromStub() {
-        final Capture<String> capture = new Capture<String>(CaptureType.ALL);
+        final Capture<String> capture = Capture.newInstance(CaptureType.ALL);
         final IMethods mock = createMock(IMethods.class);
         expect(mock.oneArg(capture(capture))).andStubReturn("1");
 
@@ -345,4 +347,36 @@ public class CaptureTest {
 
         assertEquals("test", capture.getValue());
     }
+
+    @Test
+    public void testNewInstanceForcingType() {
+        // Just to test, we put it in a base class
+        Capture<? extends Number> capture = newCapture();
+
+        IMethods mock = createMock(IMethods.class);
+        expect(mock.oneArg(capture(capture))).andStubReturn("1");
+
+        replay(mock);
+
+        mock.oneArg(Long.valueOf(0)); // note that we can capture something else than an Integer
+        mock.oneArg(Long.valueOf(1));
+
+        assertEquals(Long.valueOf(1), capture.getValue());
+    }
+
+    @Test
+    public void testNewInstanceWithCaptureTypeForcingType() {
+        // Just to test, we put it in a base class
+        Capture<? extends Number> capture = newCapture(CaptureType.FIRST);
+
+        IMethods mock = createMock(IMethods.class);
+        expect(mock.oneArg(capture(capture))).andStubReturn("1");
+
+        replay(mock);
+
+        mock.oneArg(Long.valueOf(0)); // note that we can capture something else than an Integer
+        mock.oneArg(Long.valueOf(1));
+
+        assertEquals(Long.valueOf(0), capture.getValue());
+    }
 }
diff --git a/tests/org/easymock/tests2/ChildEquals.java b/tests/org/easymock/tests2/ChildEquals.java
index bab1880..6c79999 100644
--- a/tests/org/easymock/tests2/ChildEquals.java
+++ b/tests/org/easymock/tests2/ChildEquals.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/ClassExtensionHelperTest.java b/tests/org/easymock/tests2/ClassExtensionHelperTest.java
index b40466c..04a413f 100644
--- a/tests/org/easymock/tests2/ClassExtensionHelperTest.java
+++ b/tests/org/easymock/tests2/ClassExtensionHelperTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/CompareToTest.java b/tests/org/easymock/tests2/CompareToTest.java
index ba7f159..4c4debb 100644
--- a/tests/org/easymock/tests2/CompareToTest.java
+++ b/tests/org/easymock/tests2/CompareToTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/ConstraintsToStringTest.java b/tests/org/easymock/tests2/ConstraintsToStringTest.java
index 1147b8f..5c4e0c1 100644
--- a/tests/org/easymock/tests2/ConstraintsToStringTest.java
+++ b/tests/org/easymock/tests2/ConstraintsToStringTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/ConstructorArgsTest.java b/tests/org/easymock/tests2/ConstructorArgsTest.java
index fbba74d..2e7d29f 100644
--- a/tests/org/easymock/tests2/ConstructorArgsTest.java
+++ b/tests/org/easymock/tests2/ConstructorArgsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/DelegateToTest.java b/tests/org/easymock/tests2/DelegateToTest.java
index 4afa7ad..4c052ba 100644
--- a/tests/org/easymock/tests2/DelegateToTest.java
+++ b/tests/org/easymock/tests2/DelegateToTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/DependencyTest.java b/tests/org/easymock/tests2/DependencyTest.java
index 41f9621..32c9fae 100644
--- a/tests/org/easymock/tests2/DependencyTest.java
+++ b/tests/org/easymock/tests2/DependencyTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/EasyMockAnnotationsTest.java b/tests/org/easymock/tests2/EasyMockAnnotationsTest.java
new file mode 100644
index 0000000..6f1b12c
--- /dev/null
+++ b/tests/org/easymock/tests2/EasyMockAnnotationsTest.java
@@ -0,0 +1,347 @@
+/**
+ * Copyright 2001-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.easymock.tests2;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
+import org.easymock.EasyMockSupport;
+import org.easymock.Mock;
+import org.easymock.MockType;
+import org.easymock.TestSubject;
+import org.easymock.tests.IMethods;
+import org.easymock.tests.IVarArgs;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests annotation-driven mocking, requiring to be executed with either
+ * EasyMockRunner or EasyMockRule.
+ * 
+ * @author Henri Tremblay
+ * @author Alistair Todd
+ */
+public abstract class EasyMockAnnotationsTest extends EasyMockSupport {
+
+    @Mock
+    private IMethods standardMock;
+
+    @Mock(type = MockType.NICE)
+    private IMethods typedMock;
+
+    @Mock(name = "name1")
+    private IMethods namedMock;
+
+    @Mock(name = "name2", type = MockType.NICE)
+    private IMethods namedAndTypedMock;
+
+    @Before
+    public void setup() {
+        assertNotNull(standardMock);
+        assertNotNull(typedMock);
+        assertNotNull(namedMock);
+        assertNotNull(namedAndTypedMock);
+    }
+
+    @Test
+    public void shouldCreateMocksUsingTestClassWhenExtendsEasyMockSupport() {
+        expect(standardMock.oneArg(true)).andReturn("1");
+        expect(namedMock.oneArg(true)).andReturn("2");
+        replayAll(); // Relies on this test class having been used for createMock calls.
+        assertNull(typedMock.oneArg("0"));
+        assertNull(namedAndTypedMock.oneArg("0"));
+        assertEquals("1", standardMock.oneArg(true));
+        assertEquals("2", namedMock.oneArg(true));
+        verifyAll();
+        assertEquals("EasyMock for interface org.easymock.tests.IMethods", standardMock.toString());
+        assertEquals("name1", namedMock.toString());
+        assertEquals("EasyMock for interface org.easymock.tests.IMethods", typedMock.toString());
+        assertEquals("name2", namedAndTypedMock.toString());
+    }
+
+    private static class ToInject {
+        protected IMethods m1;
+
+        protected IMethods m2;
+
+        protected IVarArgs v;
+
+        protected String a;
+
+        protected final IVarArgs f = null;
+
+        protected static IVarArgs s;
+    }
+
+    private static class ToInjectMocksTest {
+        @Mock
+        protected IMethods m;
+
+        @Mock
+        protected IVarArgs v;
+
+        @TestSubject
+        protected ToInject toInject = new ToInject();
+    }
+
+    @Test
+    public void shouldInjectMocksWhereTypeCompatible() {
+        final ToInjectMocksTest test = new ToInjectMocksTest();
+        EasyMockSupport.injectMocks(test);
+        assertSame(test.m, test.toInject.m1);
+        assertSame(test.m, test.toInject.m2);
+        assertSame(test.v, test.toInject.v);
+        assertNull(test.toInject.a);
+        assertNull(test.toInject.f);
+        assertNull(ToInject.s);
+    }
+
+    private static class ToInjectDuplicateMocksTest {
+        @Mock(name = "a")
+        protected IMethods m;
+
+        @Mock(name = "b")
+        protected IMethods v;
+
+        @TestSubject
+        protected ToInject toInject = new ToInject();
+    }
+
+    @Test
+    public void shouldErrorWhenDuplicateAssignmentPossible() {
+
+        try {
+            EasyMockSupport.injectMocks(new ToInjectDuplicateMocksTest());
+        } catch (final RuntimeException e) {
+            assertEquals(
+                    "At least two mocks can be assigned to 'protected org.easymock.tests.IMethods org.easymock.tests2.EasyMockAnnotationsTest$ToInject.m1': a and b",
+                    e.getMessage());
+            return;
+        }
+        fail("Expected an exception for at least two mocks can be assigned");
+    }
+
+    private static class ToInjectQualifiedMocksTest {
+        @Mock(name = "a", fieldName = "m1")
+        protected IMethods a;
+
+        @Mock(name = "b", fieldName = "m2")
+        protected IMethods b;
+
+        @TestSubject
+        protected ToInject toInject = new ToInject();
+    }
+
+    @Test
+    public void shouldInjectQualifiedMocksToNamedFields() {
+        final ToInjectQualifiedMocksTest test = new ToInjectQualifiedMocksTest();
+        EasyMockSupport.injectMocks(test);
+        assertSame(test.a, test.toInject.m1);
+        assertSame(test.b, test.toInject.m2);
+        assertNull(test.toInject.v);
+    }
+
+    private static class ToInjectExtension extends ToInject {
+        // Expecting assignments in superclass
+    }
+
+    private static class ToInjectQualifiedMocksToSuperClassTest {
+
+        @Mock(name = "a", fieldName = "m1")
+        protected IMethods a;
+
+        @Mock(name = "b", fieldName = "m2")
+        protected IMethods b;
+
+        @TestSubject
+        protected ToInjectExtension toInject = new ToInjectExtension();
+    }
+
+    @Test
+    public void shouldInjectQualifiedMocksToTestSubjectSuperClass() throws Exception {
+        final ToInjectQualifiedMocksToSuperClassTest test = new ToInjectQualifiedMocksToSuperClassTest();
+        EasyMockSupport.injectMocks(test);
+        assertSame(test.a, test.toInject.m1);
+        assertSame(test.b, test.toInject.m2);
+        assertNull(test.toInject.v);
+    }
+
+    private static class ToInjectQualifiedMocksMultipleTestSubjectsTest {
+        @Mock(name = "a", fieldName = "m1")
+        protected IMethods a;
+
+        @Mock(name = "b", fieldName = "m2")
+        protected IMethods b;
+
+        @TestSubject
+        protected ToInject toInject = new ToInject();
+
+        @TestSubject
+        protected ToInject toInject2 = new ToInject();
+    }
+
+    @Test
+    public void shouldInjectQualifiedMocksToAllMatchingTestSubjects() throws Exception {
+        final ToInjectQualifiedMocksMultipleTestSubjectsTest test = new ToInjectQualifiedMocksMultipleTestSubjectsTest();
+        EasyMockSupport.injectMocks(test);
+        assertSame(test.a, test.toInject.m1);
+        assertSame(test.b, test.toInject.m2);
+        assertNull(test.toInject.v);
+        assertSame(test.a, test.toInject2.m1);
+        assertSame(test.b, test.toInject2.m2);
+        assertNull(test.toInject2.v);
+    }
+
+    private static class ToInjectUnsatisfiedQualifierTest {
+        @Mock(name = "a", fieldName = "m1")
+        protected IMethods a;
+
+        @Mock(name = "b", fieldName = "m2")
+        protected IMethods b;
+
+        @Mock(fieldName = "unmatched")
+        protected IVarArgs v;
+
+        @TestSubject
+        protected ToInject toInject = new ToInject();
+    }
+
+    @Test
+    public void shouldErrorWhenUnsatisfiedQualifier() {
+        try {
+            EasyMockSupport.injectMocks(new ToInjectUnsatisfiedQualifierTest());
+        } catch (final RuntimeException e) {
+            assertEquals("Unsatisfied qualifier: 'unmatched'",
+                    e.getMessage());
+            return;
+        }
+        fail("Expected an exception for unsatisfied fieldName qualifier");
+    }
+
+    private static class ToInjectTypeIncompatibleQualifierTest {
+        @Mock(name = "a", fieldName = "m1")
+        protected IMethods a;
+
+        @Mock(fieldName = "m2")
+        protected IVarArgs v;
+
+        @TestSubject
+        protected ToInject toInject = new ToInject();
+    }
+
+    @Test
+    public void shouldErrorForUnmatchedQualifierWhenTypeIncompatibleQualifier() throws Exception {
+        try {
+            EasyMockSupport.injectMocks(new ToInjectTypeIncompatibleQualifierTest());
+        } catch (final RuntimeException e) {
+            assertEquals("Unsatisfied qualifier: 'm2'",
+                    e.getMessage());
+            return;
+        }
+        fail("Expected an exception for unsatisfied fieldName qualifier");
+    }
+
+    private static class ToInjectUnassignableField extends ToInject {
+        final IMethods finalField = null;
+
+        static IMethods staticField;
+    }
+
+    private static class ToInjectUnassignableFinalFieldQualifierTest {
+        @Mock(name = "a", fieldName = "finalField")
+        protected IMethods a;
+
+        @TestSubject
+        protected ToInjectUnassignableField toInject = new ToInjectUnassignableField();
+    }
+
+    @Test
+    public void shouldErrorForUnmatchedQualifierWhenUnassignableFinalField() throws Exception {
+        try {
+            EasyMockSupport.injectMocks(new ToInjectUnassignableFinalFieldQualifierTest());
+        } catch (final RuntimeException e) {
+            assertEquals("Unsatisfied qualifier: 'finalField'",
+                    e.getMessage());
+            return;
+        }
+        fail("Expected an exception for unsatisfied fieldName qualifier");
+    }
+
+    private static class ToInjectUnassignableStaticFieldQualifierTest {
+        @Mock(name = "a", fieldName = "staticField")
+        protected IMethods a;
+
+        @TestSubject
+        protected ToInjectUnassignableField toInject = new ToInjectUnassignableField();
+    }
+
+    @Test
+    public void shouldErrorForUnmatchedQualifierWhenUnassignableStaticField() throws Exception {
+        try {
+            EasyMockSupport.injectMocks(new ToInjectUnassignableStaticFieldQualifierTest());
+        } catch (final RuntimeException e) {
+            assertEquals("Unsatisfied qualifier: 'staticField'",
+                    e.getMessage());
+            return;
+        }
+        fail("Expected an exception for unsatisfied fieldName qualifier");
+    }
+
+    private static class ToInjectDuplicateQualifierTest {
+        @Mock(name = "a", fieldName = "m1")
+        protected IMethods a;
+
+        @Mock(name = "b", fieldName = "m1")
+        protected IMethods b;
+
+        @TestSubject
+        protected ToInject toInject = new ToInject();
+    }
+
+    @Test
+    public void shouldErrorWhenDuplicateQualifiers() {
+        try {
+            EasyMockSupport.injectMocks(new ToInjectDuplicateQualifierTest());
+        } catch (final RuntimeException e) {
+            assertEquals("At least two mocks have fieldName qualifier 'm1'",
+                    e.getMessage());
+            return;
+        }
+        fail("Expected an exception for duplicate fieldName qualifier");
+    }
+
+    private static class ToInjectOneTarget {
+        protected IMethods m1;
+    }
+
+    private static class ToInjectQualifiedAndUnqualifiedTest {
+        @Mock(name = "a")
+        protected IMethods a;
+
+        @Mock(name = "b", fieldName = "m1")
+        protected IMethods b;
+
+        @TestSubject
+        protected ToInjectOneTarget toInjectOneTarget = new ToInjectOneTarget();
+    }
+
+    @Test
+    public void shouldNotAssignUnqualifiedMockWhereQualifiedMockAssigned() {
+        final ToInjectQualifiedAndUnqualifiedTest test = new ToInjectQualifiedAndUnqualifiedTest();
+        EasyMockSupport.injectMocks(test);
+        assertSame(test.b, test.toInjectOneTarget.m1);
+    }
+}
diff --git a/tests/org/easymock/tests2/EasyMockClassExtensionTest.java b/tests/org/easymock/tests2/EasyMockClassExtensionTest.java
index af6b9ca..8785044 100644
--- a/tests/org/easymock/tests2/EasyMockClassExtensionTest.java
+++ b/tests/org/easymock/tests2/EasyMockClassExtensionTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/EasyMockPropertiesTest.java b/tests/org/easymock/tests2/EasyMockPropertiesTest.java
index bb86a54..7f4b153 100644
--- a/tests/org/easymock/tests2/EasyMockPropertiesTest.java
+++ b/tests/org/easymock/tests2/EasyMockPropertiesTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/ChildEquals.java b/tests/org/easymock/tests2/EasyMockRuleTest.java
similarity index 62%
copy from tests/org/easymock/tests2/ChildEquals.java
copy to tests/org/easymock/tests2/EasyMockRuleTest.java
index bab1880..f59906c 100644
--- a/tests/org/easymock/tests2/ChildEquals.java
+++ b/tests/org/easymock/tests2/EasyMockRuleTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,11 +15,17 @@
  */
 package org.easymock.tests2;
 
+import org.easymock.EasyMockRule;
+import org.junit.Rule;
+
 /**
- * @author Henri Tremblay
+ * Runs annotation-driven tests from base class with the EasyMockRule JUnit Rule.
+ * 
+ * @author Alistair Todd
  */
-public class ChildEquals extends ParentEquals {
-    public String getString() {
-        return "x";
-    }
+public class EasyMockRuleTest extends EasyMockAnnotationsTest {
+
+    @Rule
+    public EasyMockRule mocks = new EasyMockRule(this);
+
 }
diff --git a/tests/org/easymock/tests2/EasyMockRunnerTest.java b/tests/org/easymock/tests2/EasyMockRunnerTest.java
index b8c8290..b6f70ce 100644
--- a/tests/org/easymock/tests2/EasyMockRunnerTest.java
+++ b/tests/org/easymock/tests2/EasyMockRunnerTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -16,97 +16,14 @@
 package org.easymock.tests2;
 
 import org.easymock.EasyMockRunner;
-import org.easymock.EasyMockSupport;
-import org.easymock.TestSubject;
-import org.easymock.Mock;
-import org.easymock.MockType;
-import org.easymock.tests.BaseEasyMockRunnerTest;
-import org.easymock.tests.IMethods;
-import org.easymock.tests.IVarArgs;
-import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.easymock.EasyMock.*;
-import static org.junit.Assert.*;
-
+/**
+ * Runs annotation-driven tests from base class with the EasyMockRunner JUnit Runner.
+ * 
+ * @author Henri Tremblay
+ */
 @RunWith(EasyMockRunner.class)
-public class EasyMockRunnerTest extends BaseEasyMockRunnerTest {
-
-    @Mock
-    private IMethods standardMock;
-
-    @Mock(type = MockType.NICE)
-    private IMethods typedMock;
-
-    @Mock(name = "name1")
-    private IMethods namedMock;
-
-    @Mock(name = "name2", type = MockType.NICE)
-    private IMethods namedAndTypedMock;
-
-    @Test
-    public void testMocksWithSupport() {
-        expect(standardMock.oneArg(true)).andReturn("1");
-        expect(namedMock.oneArg(true)).andReturn("2");
-        replayAll();
-        assertNull(typedMock.oneArg("0"));
-        assertNull(namedAndTypedMock.oneArg("0"));
-        assertEquals("1", standardMock.oneArg(true));
-        assertEquals("2", namedMock.oneArg(true));
-        verifyAll();
-        assertEquals("EasyMock for interface org.easymock.tests.IMethods", standardMock.toString());
-        assertEquals("name1", namedMock.toString());
-        assertEquals("EasyMock for interface org.easymock.tests.IMethods", typedMock.toString());
-        assertEquals("name2", namedAndTypedMock.toString());
-    }
-
-    private static class ToInject {
-        protected IMethods m1;
-        protected IMethods m2;
-        protected IVarArgs v;
-        protected String a;
-        protected final IVarArgs f = null;
-        protected static IVarArgs s;
-    }
-
-    private static class ToInjectTest {
-        @Mock
-        protected IMethods m;
-        @Mock
-        protected IVarArgs v;
-        @TestSubject
-        protected ToInject toInject = new ToInject();
-    }
-
-    @Test
-    public void testInjectMocks() {
-        ToInjectTest test = new ToInjectTest();
-        EasyMockSupport.injectMocks(test);
-        assertSame(test.m, test.toInject.m1);
-        assertSame(test.m, test.toInject.m2);
-        assertSame(test.v, test.toInject.v);
-        assertNull(test.toInject.a);
-        assertNull(test.toInject.f);
-        assertNull(ToInject.s);
-    }
-
-    private static class ToInjectDuplicateTest {
-        @Mock(name="a")
-        protected IMethods m;
-        @Mock(name="b")
-        protected IMethods v;
-        @TestSubject
-        protected ToInject toInject = new ToInject();
-    }
+public class EasyMockRunnerTest extends EasyMockAnnotationsTest {
 
-    @Test
-    public void testInjectDuplicate() {
-        ToInjectDuplicateTest test = new ToInjectDuplicateTest();
-        try {
-            EasyMockSupport.injectMocks(test);
-        }
-        catch (RuntimeException e) {
-            assertEquals("At least two mocks can be assigned to protected org.easymock.tests.IMethods org.easymock.tests2.EasyMockRunnerTest$ToInject.m1: a and b", e.getMessage());
-        }
-    }
 }
diff --git a/tests/org/easymock/tests2/EasyMockSupportClassTest.java b/tests/org/easymock/tests2/EasyMockSupportClassTest.java
index 12a8759..7131c34 100644
--- a/tests/org/easymock/tests2/EasyMockSupportClassTest.java
+++ b/tests/org/easymock/tests2/EasyMockSupportClassTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/EasyMockSupportTest.java b/tests/org/easymock/tests2/EasyMockSupportTest.java
index 8a73385..2ea6096 100644
--- a/tests/org/easymock/tests2/EasyMockSupportTest.java
+++ b/tests/org/easymock/tests2/EasyMockSupportTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/FilteringRule.java b/tests/org/easymock/tests2/FilteringRule.java
index b881a86..54fbf00 100644
--- a/tests/org/easymock/tests2/FilteringRule.java
+++ b/tests/org/easymock/tests2/FilteringRule.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/MockBuilderTest.java b/tests/org/easymock/tests2/MockBuilderTest.java
index 7cadc2f..2939540 100644
--- a/tests/org/easymock/tests2/MockBuilderTest.java
+++ b/tests/org/easymock/tests2/MockBuilderTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/MockedExceptionTest.java b/tests/org/easymock/tests2/MockedExceptionTest.java
index ab9b613..d7c9207 100644
--- a/tests/org/easymock/tests2/MockedExceptionTest.java
+++ b/tests/org/easymock/tests2/MockedExceptionTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/MocksControlTest.java b/tests/org/easymock/tests2/MocksControlTest.java
index a83f253..07741ae 100644
--- a/tests/org/easymock/tests2/MocksControlTest.java
+++ b/tests/org/easymock/tests2/MocksControlTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -15,6 +15,9 @@
  */
 package org.easymock.tests2;
 
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.*;
+
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.List;
@@ -25,9 +28,6 @@ import org.easymock.MockType;
 import org.easymock.internal.MocksControl;
 import org.junit.Test;
 
-import static org.easymock.EasyMock.*;
-import static org.junit.Assert.*;
-
 /**
  * @author Henri Tremblay
  */
@@ -186,14 +186,15 @@ public class MocksControlTest {
     }
 
     @Test
-    @Deprecated
+    @SuppressWarnings("deprecation")
     public void testCreateOldMockTypeFromNewMockType() {
         assertSame(MockType.NICE, MocksControl.MockType.NICE.realType);
     }
 
     @Test
     public void testCreateMocksControlFromOldMockType() {
-        MocksControl c = new MocksControl(MocksControl.MockType.NICE);
+        @SuppressWarnings("deprecation")
+        final MocksControl c = new MocksControl(MocksControl.MockType.NICE);
         assertSame(MockType.NICE, c.getType());
     }
 }
diff --git a/tests/org/easymock/tests2/NameTest.java b/tests/org/easymock/tests2/NameTest.java
index b225b15..8a93b62 100644
--- a/tests/org/easymock/tests2/NameTest.java
+++ b/tests/org/easymock/tests2/NameTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/NiceMockTest.java b/tests/org/easymock/tests2/NiceMockTest.java
index 3581232..463a48f 100644
--- a/tests/org/easymock/tests2/NiceMockTest.java
+++ b/tests/org/easymock/tests2/NiceMockTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/ParentEquals.java b/tests/org/easymock/tests2/ParentEquals.java
index b255a14..ba31a06 100644
--- a/tests/org/easymock/tests2/ParentEquals.java
+++ b/tests/org/easymock/tests2/ParentEquals.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/PartialMockingTest.java b/tests/org/easymock/tests2/PartialMockingTest.java
index 5525aa5..e35c559 100644
--- a/tests/org/easymock/tests2/PartialMockingTest.java
+++ b/tests/org/easymock/tests2/PartialMockingTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/ReflectionUtilsTest.java b/tests/org/easymock/tests2/ReflectionUtilsTest.java
index b455fd7..5183f66 100644
--- a/tests/org/easymock/tests2/ReflectionUtilsTest.java
+++ b/tests/org/easymock/tests2/ReflectionUtilsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/SerializationTest.java b/tests/org/easymock/tests2/SerializationTest.java
index 26c53df..e40a80c 100644
--- a/tests/org/easymock/tests2/SerializationTest.java
+++ b/tests/org/easymock/tests2/SerializationTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/StubTest.java b/tests/org/easymock/tests2/StubTest.java
index 6ecc26c..77c9537 100644
--- a/tests/org/easymock/tests2/StubTest.java
+++ b/tests/org/easymock/tests2/StubTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/ThreadingTest.java b/tests/org/easymock/tests2/ThreadingTest.java
index 965c924..288855a 100644
--- a/tests/org/easymock/tests2/ThreadingTest.java
+++ b/tests/org/easymock/tests2/ThreadingTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/UsageConstraintsTest.java b/tests/org/easymock/tests2/UsageConstraintsTest.java
index 961e90f..5acf030 100644
--- a/tests/org/easymock/tests2/UsageConstraintsTest.java
+++ b/tests/org/easymock/tests2/UsageConstraintsTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/UsageMatchersTest.java b/tests/org/easymock/tests2/UsageMatchersTest.java
index ba7e426..b825149 100644
--- a/tests/org/easymock/tests2/UsageMatchersTest.java
+++ b/tests/org/easymock/tests2/UsageMatchersTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/UsageStrictMockTest.java b/tests/org/easymock/tests2/UsageStrictMockTest.java
index 404acbf..9479f32 100644
--- a/tests/org/easymock/tests2/UsageStrictMockTest.java
+++ b/tests/org/easymock/tests2/UsageStrictMockTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tests/org/easymock/tests2/UsageTest.java b/tests/org/easymock/tests2/UsageTest.java
index ae691ab..d113abc 100644
--- a/tests/org/easymock/tests2/UsageTest.java
+++ b/tests/org/easymock/tests2/UsageTest.java
@@ -1,5 +1,5 @@
 /**
- * Copyright 2001-2013 the original author or authors.
+ * Copyright 2001-2014 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/easymock.git



More information about the pkg-java-commits mailing list