Trying to test cache in DoInBackground()
<p>I am trying to test a for a cache file in do in background but the asyncTask isnt running at all with this code.</p>

<pre><code>    @Override
    protected Void doInBackground(Void... arg0) {try {

    URL aURL = new URL(imageUrl);

     URI imageUri = null;
             try {
         imageUri = aURL.toURI();

         } catch (URISyntaxException e1) {
           // TODO Auto-generated catch block
            e1.printStackTrace();
            }



    //Testing to see if images are already in cache, if not then we load the images from the web and save them to the cache.
     if (new File(new File(MainMenu.this.getCacheDir(), "thumbnails"), "" + imageUri.hashCode()).exists()){
Log.v("No", "Images do not excist in cache...Getting them now");

                                getImages();
                                Log.v("MyTask", "Image 1 retreived");
                                getImage2();
                                Log.v("MyTask", "Image 2 retreived");
                                getImage3();
                                Log.v("MyTask", "Image 3 retreived");
                                getImage4();
                                Log.v("MyTask", "Image 4 retreived");

                            getImage1Url();



                           }else{


                           }
</code></pre>

<p>Once i take the if else tester out. It works fine. Is it ilegal to test in the asyncTask?
if so what would be the best way to do this? Maybe make another method testing the cache and use it in the async?</p>
