         if stubCalled(ofFunction: function, withArgs: args) {
             return stub.performActions()
         }
-//      case .When: break
+      case .When:
+        registerStub(ofFunction: function, withArgs: args)
+
+        transtion(toState: .None)
 //      case .Verify: break
 //      case .GetArgs: break
       default: break

  private func match(stub: Stub, withFunctionName functionName: String, andArgs args: [Any?]) -> Bool {
    return stub.satisfyStub(withFunctionName: functionName) && stub.satisfyStub(withActualArgs: args)
  }
}
  private var stub: Stub!
  private var stubs = [Stub]()
  
  private var state = State.None
  private var verificationMode: VerificationMode!

  private var callHistory = [String: [[Any?]]]()
