### Question:
ModelSpecificDistanceCalculator implements DistanceCalculator { public AndroidModel getModel() { return mModel; } 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 testSelectsDefaultModel() { org.robolectric.shadows.ShadowLog.stream = System.err; ModelSpecificDistanceCalculator distanceCalculator = new ModelSpecificDistanceCalculator(null, null); assertEquals("Default model should be Nexus 5", "Nexus 5", distanceCalculator.getModel().getModel()); }
@Test public void testSelectsNexus4OnExactMatch() { org.robolectric.shadows.ShadowLog.stream = System.err; AndroidModel model = new AndroidModel("4.4.2", "KOT49H","Nexus 4","LGE"); ModelSpecificDistanceCalculator distanceCalculator = new ModelSpecificDistanceCalculator(null, null, model); assertEquals("should be Nexus 4", "Nexus 4", distanceCalculator.getModel().getModel()); }