@Test
public void doTest() {
dao.deleteAll(Lists.newArrayList("SJDK3849CKMS3849DJCK2039ZMSK0012","SJDK3849CKMS3849DJCK2039ZMSK0013","SJDK3849CKMS3849DJCK2039ZMSK0014"));
sessionFactory.getCurrentSession().flush();
Menu parent = dao.get("SJDK3849CKMS3849DJCK2039ZMSK0011");
Assert.assertFalse(parent.getLeaf());
Menu menu = new Menu();
menu.setParent(parent);
menu.setName("test_l");
menu.setType(1);
dao.save(menu);
sessionFactory.getCurrentSession().flush();
parent = dao.get("SJDK3849CKMS3849DJCK2039ZMSK0011");
Assert.assertTrue(parent.getLeaf());