@Test
public void testIsValidServiceNameCreationWithOutSpecialCharacters() throws Exception{

	String serviceName        = "c1_yarn";
	String serviceDisplayName = serviceName;
	RangerService rangerService = new RangerService();
	rangerService.setName(serviceName);
	rangerService.setDisplayName(serviceDisplayName);
	rangerService.setType("yarn");
	rangerService.setTagService("");
	RangerServiceConfigDef configDef = new RangerServiceConfigDef();
	configDef.setMandatory(true);
	
	List<RangerServiceConfigDef> listRangerServiceConfigDef = new ArrayList<RangerServiceDef.RangerServiceConfigDef>();
	listRangerServiceConfigDef.add(configDef);
	
	
	configDef.setName("myconfig1");
	
	Map<String,String> testMap = new HashMap<String, String>();
	testMap.put("myconfig1", "myconfig1");
	
	rangerService.setConfigs(testMap);
	
	
	RangerServiceDef rangerServiceDef = new RangerServiceDef();
	rangerServiceDef.setConfigs(listRangerServiceConfigDef);
	
	when(_store.getServiceDefByName("yarn")).thenReturn(rangerServiceDef);
	boolean  valid = _validator.isValid(rangerService, Action.CREATE, _failures);
	Assert.assertEquals(0, _failures.size());
	Assert.assertTrue(valid);
}