@Test
public void test_getImpliedGrants() {

	
	// passing in null gets back a null
	Collection<String> result = _validator.getImpliedGrants(null);
	Assert.assertNull(result);
	
	// null or empty implied grant collection gets back an empty collection
	RangerAccessTypeDef accessTypeDef = mock(RangerAccessTypeDef.class);
	when(accessTypeDef.getImpliedGrants()).thenReturn(null);
	result = _validator.getImpliedGrants(accessTypeDef);
	Assert.assertTrue(result.isEmpty());
	
	List<String> impliedGrants = new ArrayList<>();
	when(accessTypeDef.getImpliedGrants()).thenReturn(impliedGrants);
	result = _validator.getImpliedGrants(accessTypeDef);
	Assert.assertTrue(result.isEmpty());
	// null/empty values come back as is
	impliedGrants = Arrays.asList(new String[] { null, "", " ", "		" });
	when(accessTypeDef.getImpliedGrants()).thenReturn(impliedGrants);
	result = _validator.getImpliedGrants(accessTypeDef);
	Assert.assertEquals(4, result.size());
	
	// non-empty values get lower cased
	impliedGrants = Arrays.asList(new String[] { "a", "B", "C	", " d " });
	when(accessTypeDef.getImpliedGrants()).thenReturn(impliedGrants);
	result = _validator.getImpliedGrants(accessTypeDef);
	Assert.assertEquals(4, result.size());
	Assert.assertTrue(result.contains("a"));
	Assert.assertTrue(result.contains("b"));
	Assert.assertTrue(result.contains("c	"));
	Assert.assertTrue(result.contains(" d "));
}