LocationUtils { static boolean isAcceptable(LocationUSourceData data, Location location) { if (location == null) return false; if (location.getAccuracy() > data.thresholdAccuracy) return false; if ((System.currentTimeMillis() - location.getTime()) > data.thresholdAge * LocationUSourceData.UNIT_THRESHOLD_TIME) return false; return true; }   static final int METERS_PER_DEGREE; }
@Test public void testIsAcceptableWhenLocationIsNull() { Assert.assertFalse( LocationUtils.isAcceptable(new LocationUSourceDataFactory().dummyData(), null) ); }