@Test public void testGet() throws Exception { SecurityGroup group = dao.get(2L); Assert.assertNotNull(group); Assert.assertEquals(2L, group.getId()); Assert.assertTrue(group.getName().length() > 0); Assert.assertTrue(group.getDescription().length() > 0); Assert.assertTrue(group.getRoles().size() > 0); }
@Test public void testSave() throws Exception { SecurityGroup group = new SecurityGroup(); group.setDescription("test group"); group.setName("name"); group.setLeft(99); group.setRight(100); dao.save(group); Assert.assertTrue(group.getId() > 0); }