RangerTagDefServiceBase extends
		RangerBaseModelService<T, V> { @Override protected T mapViewToEntityBean(V vObj, T xObj, int OPERATION_CONTEXT) { String guid = (StringUtils.isEmpty(vObj.getGuid())) ? guidUtil.genGUID() : vObj.getGuid(); xObj.setGuid(guid); xObj.setVersion(vObj.getVersion()); xObj.setIsEnabled(vObj.getIsEnabled()); xObj.setName(vObj.getName()); xObj.setSource(vObj.getSource()); return xObj; }  List<RangerTagAttributeDef> getAttributeDefForTagDef(XXTagDef xtagDef); RangerTagAttributeDef populateRangerTagAttributeDef(XXTagAttributeDef xObj); XXTagAttributeDef populateXXTagAttributeDef(RangerTagAttributeDef attrDef, XXTagAttributeDef xTagAttrDef,
			XXTagDef parentObj); PList<V> searchRangerTagDefs(SearchFilter searchFilter);  }
@Test public void test1mapViewToEntityBean() { RangerTagDef rangerTagDef = new RangerTagDef(); rangerTagDef.setId(id); rangerTagDef.setGuid(guid); XXTagDef xxTagDef = new XXTagDef(); xxTagDef.setId(id); xxTagDef.setGuid(guid); xxTagDef.setName(name); xxTagDef.setVersion(version); int operationContext = 1; XXTagDef result = rangerTagDefService.mapViewToEntityBean(rangerTagDef,xxTagDef,operationContext); Assert.assertNotNull(result); Assert.assertEquals(result, xxTagDef); Assert.assertEquals(result.getGuid(), xxTagDef.getGuid()); Assert.assertEquals(result.getName(), xxTagDef.getName()); Assert.assertEquals(result.getId(), xxTagDef.getId()); Assert.assertEquals(result.getVersion(), xxTagDef.getVersion()); }