SeparatorRenderer deferredSeparator,
SeparatedContent triggeringContent,
SeparatorRenderer triggeringSeparator,
MethodAction action) {
CompositeExpectedValue expectedDecisionValue =
MockFactory.getDefaultInstance().expectsAll();
ExpectedValue value;
// All that we can tell about the decision object itself is that it is
// a decison object, as the compiler should detect an invalid object
// being passed we do not have anything to do.
// We do however, know what the decision object should contain.
value = expectsReturnValue(
new SeparatedContentInvoker() {
public SeparatedContent invoke(Object object) {
return ((ArbitratorDecision) object).getPreviousContent();
}
},
previousContent);
expectedDecisionValue.addExpectedValue(value);
value = expectsReturnValue(
new SeparatorRendererInvoker() {
public SeparatorRenderer invoke(Object object) {
return ((ArbitratorDecision) object).getDeferredSeparator();
}
},
deferredSeparator);
expectedDecisionValue.addExpectedValue(value);
value = expectsReturnValue(
new SeparatedContentInvoker() {
public SeparatedContent invoke(Object object) {
return ((ArbitratorDecision) object).getTriggeringContent();
}
},
triggeringContent);
expectedDecisionValue.addExpectedValue(value);
value = expectsReturnValue(
new SeparatorRendererInvoker() {
public SeparatorRenderer invoke(Object object) {
return ((ArbitratorDecision) object).getTriggeringSeparator();
}
},
triggeringSeparator);
expectedDecisionValue.addExpectedValue(value);
mockArbitrator.fuzzy.decide(separatorManager, expectedDecisionValue)
.does(action);
}