@Test public void testGetFrequencyJSON() throws Exception { final JSON expected = new JSON(); expected.addValues("foo", Lists.newArrayList( new YearAndValue(1910, 0.6f), new YearAndValue(1920, 0.1f), new YearAndValue(1930, 0.3f), new YearAndValue(1940, 0.5f))); final Map<String, Object> actual = Server.getFrequencyJson(db, CORPUS, "foo"); assertEquals(expected.data.get("xs"), actual.get("xs")); assertEquals(((List<?>) expected.data.get("columns")).get(0), ((List<?>) actual.get("columns")).get(0)); }
static final Map<String, Object> getFrequencyJson(final DatabaseService db, final String corpus, final String word) throws Exception { return new JSON().addValues(word, db.getYearAndFrequency(corpus, word)).data; }
Server { static final Map<String, Object> getFrequencyJson(final DatabaseService db, final String corpus, final String word) throws Exception { return new JSON().addValues(word, db.getYearAndFrequency(corpus, word)).data; } }
Server { static final Map<String, Object> getFrequencyJson(final DatabaseService db, final String corpus, final String word) throws Exception { return new JSON().addValues(word, db.getYearAndFrequency(corpus, word)).data; }  }
Server { static final Map<String, Object> getFrequencyJson(final DatabaseService db, final String corpus, final String word) throws Exception { return new JSON().addValues(word, db.getYearAndFrequency(corpus, word)).data; }  static void startErrorServer(final Configuration config, final ArrayList<String> messageParts); static void startServer(final DatabaseService db, final Configuration config, boolean onlyExternal); static void stopServer(); }
Server { static final Map<String, Object> getFrequencyJson(final DatabaseService db, final String corpus, final String word) throws Exception { return new JSON().addValues(word, db.getYearAndFrequency(corpus, word)).data; }  static void startErrorServer(final Configuration config, final ArrayList<String> messageParts); static void startServer(final DatabaseService db, final Configuration config, boolean onlyExternal); static void stopServer();  }