- @Before
- public void setUp() throws Exception {
- logger.info("setUp: Entering");
- commonClassDao = Mockito.mock(CommonClassDao.class);
- UserInfo userInfo = new UserInfo();
- userInfo.setUserLoginId("testUserId");
- userInfo.setUserName("John");
- when(commonClassDao.getEntityItem(UserInfo.class, "userLoginId", "testing")).thenReturn(userInfo);
- List<String> brms = new ArrayList<String>();
- brms.add("BRMS-Model");
- when(commonClassDao.getDataByColumn(BRMSParamTemplate.class, "name")).thenReturn(brms);
- doNothing().when(commonClassDao).delete(new BRMSParamTemplate());
- doNothing().when(commonClassDao).save(new BRMSParamTemplate());
- controller = new BRMSDictionaryController();
- request = Mockito.mock(HttpServletRequest.class);
- response = new MockHttpServletResponse();
- logger.info("setUp: exit");
- }
+ @Before
+ public void setUp() throws Exception {
+ logger.info("setUp: Entering");
+ commonClassDao = Mockito.mock(CommonClassDao.class);
+ UserInfo userInfo = new UserInfo();
+ userInfo.setUserLoginId("testUserId");
+ userInfo.setUserName("John");
+ when(commonClassDao.getEntityItem(UserInfo.class, "userLoginId", "testing")).thenReturn(userInfo);
+ List<String> brms = new ArrayList<String>();
+ brms.add("BRMS-Model");
+ when(commonClassDao.getDataByColumn(BRMSParamTemplate.class, "name")).thenReturn(brms);
+ doNothing().when(commonClassDao).delete(new BRMSParamTemplate());
+ doNothing().when(commonClassDao).save(new BRMSParamTemplate());
+ controller = new BRMSDictionaryController();
+ request = Mockito.mock(HttpServletRequest.class);
+ response = new MockHttpServletResponse();
+ new DictionaryUtils(commonClassDao);
+ DictionaryUtils.setDictionaryUtils(new DictionaryUtils());
+ mock(DictionaryUtils.class);
+ logger.info("setUp: exit");
+ }