### Question:
WikidataInterface { public static List<String> getEntities(String text) throws XPathExpressionException, ParserConfigurationException, SAXException, IOException, TransformerException, URISyntaxException { final ArrayList<String> strings = new ArrayList<>(); String json = makeRequest(text, "en"); try { JSONObject Ojson = (JSONObject) JSONSerializer.toJSON(json); if (Ojson.getInt("success") < 1) { return strings; } JSONArray results = Ojson.getJSONArray("search"); for (Object result : results) { final JSONObject sres = (JSONObject) result; strings.add(sres.getString("id")); } } catch (Exception e) { e.printStackTrace(); } return strings; }  static List<String> getEntities(String text); static List<String> getAliases(String qid);  }### Answer:
@Test public void testGetEntities() throws Exception { final ArrayList<String> expected = Lists.newArrayList("Q12916"); Assert.assertEquals(expected.get(0), WikidataInterface.getEntities("real number").get(0)); }