@Test
public void test4createTagDef() {

	RangerTagDef oldtagDef = new RangerTagDef();
	oldtagDef.setId(id);
	
	try {
		Mockito.when(validator.preCreateTagDef(oldtagDef, false)).thenReturn(
				oldtagDef);
	} catch (Exception e) {
	}
	Mockito.when(
			restErrorUtil.createRESTException(Mockito.anyInt(),
					Mockito.anyString(), Mockito.anyBoolean())).thenThrow(
			new WebApplicationException());
	thrown.expect(WebApplicationException.class);
	tagREST.createTagDef(oldtagDef, false);
	try {
		Mockito.verify(validator).preCreateTagDef(oldtagDef, false);
	} catch (Exception e) {
	}
	Mockito.verify(restErrorUtil).createRESTException(Mockito.anyInt(),
			Mockito.anyString(), Mockito.anyBoolean());
}