     public weak var textFieldDelegate: UITextFieldDelegate?
     
     let fields: Array<UITextField>
+    var notificationCenter: NSNotificationCenter
 
     /**
      Instantiates `KeyboardController` object.
      
+     - important: Initialises with default `NSNotificationCenter`.
+     
      - parameter field: an `UITextField` object.
      
      - author: Michal Konturek
      */
     convenience public init(field: UITextField) {
-        self.init(fields: [field])
+        self.init(fields: [field], notificationCenter: NSNotificationCenter.defaultCenter())
     }
 
     /**
      Instantiates `KeyboardController` object.
      
+     - important: Initialises with default `NSNotificationCenter`.
+     
      - parameter fields: an array of `UITextField` objects.
      
      - author: Michal Konturek
      */
-    public init(fields: Array<UITextField>) {
+    convenience public init(fields: Array<UITextField>) {
+        self.init(fields: fields, notificationCenter: NSNotificationCenter.defaultCenter())
+    }
+
+    /**
+     Instantiates `KeyboardController` object.
+     
+     - parameter fields: an array of `UITextField` objects.
+     
+     - author: Michal Konturek
+     */
+    public init(fields: Array<UITextField>, notificationCenter: NSNotificationCenter) {
         self.fields = fields
+        self.notificationCenter = notificationCenter
         super.init()
 
         for field in self.fields {

    }
    
    func subscribeToNotifications() {
        let center = NSNotificationCenter.defaultCenter()
        center.addObserver(self,
                           selector: #selector(onKeyboardDidHide),
                           name: UIKeyboardDidHideNotification,

    }
    
    deinit {
        self.notificationCenter.removeObserver(self)
    }
}

