assertTrue(categoriesJson.contains("hello"));
}
@Test
public void getGoodsJson() {
Category c = new Category();
c.setName("hello");
c.setDescription(new Text("desc"));
Category c1 = new Category();
c1.setName("another");
c1.setDescription(new Text("desc"));
Good g1 = new Good();
Good g2 = new Good();
Good g3 = new Good();
g1.setName("g1_name");
g2.setName("g2_name");
g3.setName("g3_name");
g1.setDescription(new Text("g1_desc"));
g2.setDescription(new Text("g2_desc"));
g3.setDescription(new Text("g3_desc"));
c.getGoods().add(g1);
c.getGoods().add(g2);
c1.getGoods().add(g3);
Key key1 = dh.saveCategoryWithGoods(c);
dh.saveCategoryWithGoods(c1);
String json = dh.getGoodsJson(KeyFactory.keyToString(key1));