final List<Answer> answers = new LinkedList<Answer>();
private final Reporter reporter = new Reporter();
public <T> T when(T mock) {
MockUtil mockUtil = new MockUtil();
if (mock == null) {
reporter.nullPassedToWhenMethod();
} else {
if (!mockUtil.isMock(mock)) {
reporter.notAMockPassedToWhenMethod();
}
}
mockUtil.getMockHandler(mock).setAnswersForStubbing(answers);
return mock;
}