XPermMapService extends XPermMapServiceBase<XXPermMap, VXPermMap> { public String getUserName(Long userId){ if(userId!=null && userId!=0){ VXUser vXUser = xUserService.readResource(userId); return vXUser.getName(); } else return null; } XPermMapService(); @Override VXPermMap populateViewBean(XXPermMap xXPermMap); String getGroupName(Long groupId); String getUserName(Long userId); List<XXTrxLog> getTransactionLog(VXPermMap vXPermMap, String action); List<XXTrxLog> getTransactionLog(VXPermMap vObj, VXPermMap mObj, String action);  }
@Test public void test2GetUserName() { Mockito.when(xUserService.readResource(1L)).thenReturn(vXUser); xPermMapService.getUserName(1L); }