title: test all the views of fragment using assertNotNull() method of JUnit
body: <p>I want to test all the views of fragment using <code>assertNotNull()</code> method of <code>JUnit</code>, for that i have used <code>fragmentobject.getView()</code> but it is not working, i think fragments are getting loaded at the time of calling <code>fragmentobject.getView()</code> and i used timer and thread to let the fragment load even i couldn't get the view. Is there any other way to get fragment's view in JUnit test-case, is it possible to control the flow of <code>JUnit</code> by using threads and timers.</p>
  
  <pre><code>Timer myTimer = new Timer();
       myTimer.schedule(new TimerTask() {
  
          @Override
          public void run() {
              // TODO Auto-generated method stub
              mainFragmentManager.addLaunchMainmenu();
                      /*mainFragmentMAnager is fragmentactivity object 
                      and addLaunchMainMenu() adds fragment */
              Log.d("LaunchMenuTest"," In side timer loop");
                              view = launchmainmenu.getView();
              }
      },60000);
  </code></pre>
  
  <p>mainFragmentManager is the fragmentactivity object and addLauchMainmenu() adds fragment.</p>