InternalPermissionTemplateService service;
@Rule
public ExpectedException expected = ExpectedException.none();
@Before
public void setUp() {
<BUG>MockUserSession.set().setLogin("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
MyBatis myBatis = mock(MyBatis.class);</BUG>
when(myBatis.openSession(false)).thenReturn(session);
service = new InternalPermissionTemplateService(db, myBatis, permissionTemplateDao, userDao, finder);
}

InternalPermissionTemplateService service;
@Rule
public ExpectedException expected = ExpectedException.none();
@Before
public void setUp() {
MockUserSession.set().setLogin("admin").setGlobalPermissions(GlobalPermissions.SYSTEM_ADMIN);
when(db.propertiesDao()).thenReturn(propertiesDao);
MyBatis myBatis = mock(MyBatis.class);
when(myBatis.openSession(false)).thenReturn(session);
service = new InternalPermissionTemplateService(db, myBatis, permissionTemplateDao, userDao, finder);
}
