private void removeMatchingExpectationsCreatedBefore(@Nonnull ExpectedInvocation invocation) { Expectation previousExpectation = findPreviousNotStrictExpectation(invocation); if (previousExpectation != null) { notStrictExpectations.remove(previousExpectation); invocation.copyDefaultReturnValue(previousExpectation.invocation); } }