@Test
public void test_getAccessTypes() {

	// passing in null service def
	Set<String> accessTypes = _validator.getAccessTypes((RangerServiceDef)null);
	Assert.assertTrue(accessTypes.isEmpty());
	// that has null or empty access type def
	RangerServiceDef serviceDef = mock(RangerServiceDef.class);
	when(serviceDef.getAccessTypes()).thenReturn(null);
	accessTypes = _validator.getAccessTypes(serviceDef);
	Assert.assertTrue(accessTypes.isEmpty());
	List<RangerAccessTypeDef> accessTypeDefs = new ArrayList<>();
	when(serviceDef.getAccessTypes()).thenReturn(accessTypeDefs);
	accessTypes = _validator.getAccessTypes(serviceDef);
	Assert.assertTrue(accessTypes.isEmpty());
	
	// having null accesstypedefs
	accessTypeDefs.add(null);
	accessTypes = _validator.getAccessTypes(serviceDef);
	Assert.assertTrue(accessTypes.isEmpty());
	
	// access type defs with null empty blank names are skipped, spaces within names are preserved
	String[] names = new String[] { null, "", "a", "  ", "b ", "		", " C", "	D	" };
	accessTypeDefs.addAll(_utils.createAccessTypeDefs(names));
	accessTypes = _validator.getAccessTypes(serviceDef);
	Assert.assertEquals(4, accessTypes.size());
	Assert.assertTrue(accessTypes.contains("a"));
	Assert.assertTrue(accessTypes.contains("b "));
	Assert.assertTrue(accessTypes.contains(" C"));
	Assert.assertTrue(accessTypes.contains("	D	"));
}