SuggestResponse { public void addSuggestion(String suggestion) { this.suggestions.add(suggestion); }  List<String> getSuggestions(); void setSuggestions(List<String> suggestions); void addSuggestion(String suggestion);  }
@Test public void testSuggestResponse() throws Exception { SuggestResponse response = new SuggestResponse(); response.addSuggestion("sys.cpu.idle"); response.addSuggestion("sys.cpu.user"); String r = JsonUtil.getObjectMapper().writeValueAsString(response); Assert.assertEquals("[\"sys.cpu.idle\",\"sys.cpu.user\"]", r); }