### Question:
QueryOverpass implements SourceContract.Overpass { public String getType(JSONObject tags) throws JSONException { String type = ""; if (tags.has("amenity")) { type = tags.getString("amenity"); } if (tags.has("shop")) { type = tags.getString("shop"); } if (tags.has("tourism")) { type = tags.getString("tourism"); } if (tags.has("leisure")) { type = tags.getString("leisure"); } return type; } QueryOverpass(Context context);   QueryOverpass(); @Override String getOverpassUri(double latitude, double longitude, float accuracy); @Override String queryOverpassApi(String urlString); @Override void processResult(String result); @Override void queryOverpass(double latitude, double longitude, float accuracy); String getType(JSONObject tags);  }### Answer:
@Test public void testGetOverpassResultPoiType() throws JSONException { String expected_result = "hairdresser"; JSONObject json = new JSONObject().put("amenity", expected_result); String result = queryOverpass.getType(json); assertEquals(expected_result, result); }