title: How to write unit test for NSNotification
body: <p>I am working in swift, I want to refresh a page so I am sending it using notification, I am posting a notification in one ViewController and adding observer in another and it is working perfectly. What I want to do is add unit test to it in swift. I checked many sites but was not able to do it. I am new to swift and don't know where to start.</p>
  
  <p>Basically the working is, when i click the button notification is posted and when the next view controller is loaded the notification observer is added.</p>
  
  <p>How can I do the unit testing</p>
  
  <p>Thanks in advance</p>
  
  <p>Edit:
  Code</p>
  
  <pre><code>NSNotificationCenter.defaultCenter().postNotificationName("notificationName", object: nil)
  </code></pre>
  
  <p>and adding observer as</p>
  
  <pre><code>NSNotificationCenter.defaultCenter().addObserver(self, selector: "vvv:",name:"notificationName", object: nil)
  </code></pre>