@Override
 protected void onPostExecute(Place result) {
   if (mActivityReference != null && mActivityReference.get() != null) {
     PlaceDetailsActivity activity = this.mActivityReference.get();
     if (activity != null) {
       activity.showPlace(result);
       activity.mLoader = null;
     }
   }
 }
  public void testDataProvider() {
    assertNotNull(mDataManager);

    android.location.Location currentLocation = AppLocationManager.getCurrentLocation();
    Location location =
        new Location(
            String.valueOf(currentLocation.getLatitude()),
            String.valueOf(currentLocation.getLongitude()));

    final List<Place> eventList =
        mDataManager.getPlaceList(location, PlaceCategoryFilter.HOTEL, "8", ""); // see parameters
    assertNotNull(eventList);
    assertTrue(eventList.size() > 0);

    final Place place = eventList.get(0);

    final CountDownLatch latch = new CountDownLatch(1);

    mPlaceActivity.runOnUiThread(
        new Runnable() {

          @Override
          public void run() {
            mPlaceActivity.showPlace(place);
            latch.countDown();
          }
        });

    try {
      latch.await();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  } // end testDataProvider
  @UiThreadTest
  public void testActivityUI() {

    ImageView img =
        (ImageView) mPlaceActivity.findViewById(edu.fiu.cs.seniorproject.R.id.place_image);
    assertNotNull(img);

    TextView tvn = (TextView) mPlaceActivity.findViewById(edu.fiu.cs.seniorproject.R.id.place_name);
    assertNotNull(tvn);

    TextView tvloc =
        (TextView) mPlaceActivity.findViewById(edu.fiu.cs.seniorproject.R.id.place_location);
    assertNotNull(tvloc);

    TextView tvdist =
        (TextView) mPlaceActivity.findViewById(edu.fiu.cs.seniorproject.R.id.place_distance);
    assertNotNull(tvdist);

    TextView tvdesc =
        (TextView) mPlaceActivity.findViewById(edu.fiu.cs.seniorproject.R.id.place_description);
    assertNotNull(tvdesc);

    TextView tvevent = (TextView) mPlaceActivity.findViewById(android.R.id.empty);
    assertNotNull(tvevent);

    View vw = (View) mPlaceActivity.findViewById(edu.fiu.cs.seniorproject.R.id.mapview);
    assertNotNull(vw);
  } // end testActivityUI
 public void testStateDestroy() {
   mPlaceActivity.finish();
   mPlaceActivity = this.getActivity();
   assertNotNull(mPlaceActivity);
 } // end testStateDestroy