RangerTagResourceMapService extends RangerTagResourceMapServiceBase<XXTagResourceMap, RangerTagResourceMap> { @Override public RangerTagResourceMap postCreate(XXTagResourceMap tagResMap) { RangerTagResourceMap ret = super.postCreate(tagResMap); daoMgr.getXXServiceVersionInfo().updateServiceVersionInfoForTagResourceMapCreate(tagResMap.getResourceId(), tagResMap.getTagId()); return ret; } RangerTagResourceMapService(); @Override RangerTagResourceMap postCreate(XXTagResourceMap tagResMap); RangerTagResourceMap getPopulatedViewObject(XXTagResourceMap xObj); List<RangerTagResourceMap> getByTagId(Long tagId); List<RangerTagResourceMap> getByTagGuid(String tagGuid); List<RangerTagResourceMap> getByResourceId(Long resourceId); List<Long> getTagIdsForResourceId(Long resourceId); List<RangerTagResourceMap> getByResourceGuid(String resourceGuid); RangerTagResourceMap getByGuid(String guid); RangerTagResourceMap getByTagAndResourceId(Long tagId, Long resourceId); RangerTagResourceMap getByTagAndResourceGuid(String tagGuid, String resourceGuid); List<RangerTagResourceMap> getTagResourceMapsByServiceId(Long serviceId);  }
@Test public void test1PostCreate() { Mockito.when(daoMgr.getXXPortalUser()).thenReturn(XXPortalUserDao); Mockito.when(daoMgr.getXXServiceVersionInfo()).thenReturn(xXServiceVersionInfoDao); rangerTagResourceMapService.postCreate(xXTagResourceMap); }