AggregatorsResponse { public void addAggregator(String agg) { this.aggregators.add(agg); }  List<String> getAggregators(); void setAggregators(List<String> aggregators); void addAggregator(String agg); static final AggregatorsResponse RESPONSE; }
@Test public void testAggregatorsResponse() throws Exception { AggregatorsResponse response = new AggregatorsResponse(); response.addAggregator("min"); response.addAggregator("max"); String r = JsonUtil.getObjectMapper().writeValueAsString(response); Assert.assertEquals("[\"min\",\"max\"]", r); }