@Test
public void test40createTagResourceMap() {

	RangerTagResourceMap oldTagResourceMap = null;
	RangerTagResourceMap newTagResourceMap = new RangerTagResourceMap();
	newTagResourceMap.setId(id);
	newTagResourceMap.setGuid(gId);
	RangerTagResourceMap finalTagResourceMap = new RangerTagResourceMap();
	finalTagResourceMap.setId(id);
	finalTagResourceMap.setGuid(gId);
	finalTagResourceMap.setVersion(5L);
	
	try {
		Mockito.when(tagStore.getTagResourceMapForTagAndResourceGuid(tagGuid, resourceGuid)).thenReturn(oldTagResourceMap);
	} catch (Exception e) {
	}
	try {
		Mockito.when(validator.preCreateTagResourceMap(tagGuid, resourceGuid)).thenReturn(newTagResourceMap);
	} catch (Exception e1) {
	}
	try {
		Mockito.when(tagStore.createTagResourceMap(newTagResourceMap)).thenReturn(finalTagResourceMap);
	} catch (Exception e1) {
	}
	RangerTagResourceMap result = tagREST.createTagResourceMap(tagGuid, resourceGuid, true);
	Assert.assertNotNull(result.getId());
	Assert.assertEquals(result.getGuid(), finalTagResourceMap.getGuid());
	Assert.assertEquals(result.getId(), finalTagResourceMap.getId());
	Assert.assertEquals(result.getVersion(), finalTagResourceMap.getVersion());
	
	try {
		Mockito.verify(tagStore).getTagResourceMapForTagAndResourceGuid(tagGuid, resourceGuid);
	} catch (Exception e) {
	}
	try {
		Mockito.verify(validator).preCreateTagResourceMap(tagGuid, resourceGuid);
	} catch (Exception e) {
	}
	try {
		Mockito.verify(tagStore).createTagResourceMap(newTagResourceMap);
	} catch (Exception e) {
	}
}