### Question:
RangerTagService extends RangerTagServiceBase<XXTag, RangerTag> { @Override public RangerTag postUpdate(XXTag tag) { RangerTag ret = super.postUpdate(tag); daoMgr.getXXServiceVersionInfo().updateServiceVersionInfoForTagUpdate(tag.getId()); return ret; } RangerTagService(); @Override RangerTag postCreate(XXTag tag); @Override RangerTag postUpdate(XXTag tag); RangerTag getPopulatedViewObject(XXTag xObj); RangerTag getTagByGuid(String guid); List<RangerTag> getTagsByType(String name); List<RangerTag> getTagsForResourceId(Long resourceId); List<RangerTag> getTagsForResourceGuid(String resourceGuid); List<RangerTag> getTagsByServiceId(Long serviceId); @Override Map<String, String> getAttributesForTag(XXTag xTag); static final Type subsumedDataType; }### Answer:
@Test public void test1postUpdate() { Mockito.when(daoMgr.getXXPortalUser()).thenReturn(xXPortalUserDao); Mockito.when(daoMgr.getXXTagDef()).thenReturn(xXTagDefDao); Mockito.when(xXTagDefDao.getById(xXTag.getType())).thenReturn(xXTagDef); Mockito.when(daoMgr.getXXServiceVersionInfo()).thenReturn(xXServiceVersionInfoDao); rangerTagService.postUpdate(xXTag); }