protected Expectation createExpectation() {
return createCompositeExpectation();
}
public void testImmutable() {
CompositeExpectation expectation = createCompositeExpectation();
expectation.addExpectation(new TestSimpleExpectation("A"));
((InternalExpectation) expectation).makeImmutable();
try {
expectation.addExpectation(new TestSimpleExpectation("B"));
fail("Did not detect attempt to change immutable expectation");
} catch (IllegalStateException e) {
}
}