### Question:
ModelSpecificDistanceCalculator implements DistanceCalculator { @Override public double calculateDistance(int txPower, double rssi) { if (mDistanceCalculator == null) { LogManager.w(TAG, "distance calculator has not been set"); return -1.0; } return mDistanceCalculator.calculateDistance(txPower, rssi); } ModelSpecificDistanceCalculator(Context context, String remoteUpdateUrlString);  ModelSpecificDistanceCalculator(Context context, String remoteUpdateUrlString, AndroidModel model); AndroidModel getModel(); AndroidModel getRequestedModel(); @Override double calculateDistance(int txPower, double rssi);  }### Answer:
@Test public void testCalculatesDistance() { org.robolectric.shadows.ShadowLog.stream = System.err; ModelSpecificDistanceCalculator distanceCalculator = new ModelSpecificDistanceCalculator(null, null); Double distance = distanceCalculator.calculateDistance(-59, -59); assertEquals("Distance should be 1.0 for same power and rssi", 1.0, distance, 0.1); }