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