@Test
public final void test_getPoliciesForResourceSignature() throws Exception {

	// return null if store returns null or throws an exception
	String hexSignature = "aSignature";
	String serviceName = "service-name";
	boolean isPolicyEnabled = true;
	when(_store.getPoliciesByResourceSignature(serviceName, hexSignature, isPolicyEnabled)).thenReturn(null);
	Assert.assertNull(_validator.getPoliciesForResourceSignature(serviceName, hexSignature));
	when(_store.getPoliciesByResourceSignature(serviceName, hexSignature, isPolicyEnabled)).thenThrow(new Exception());
	Assert.assertNull(_validator.getPoliciesForResourceSignature(serviceName, hexSignature));
	// what ever store returns should come back
	hexSignature = "anotherSignature";
	List<RangerPolicy> policies = new ArrayList<>();
	RangerPolicy policy1 = mock(RangerPolicy.class);
	policies.add(policy1);
	RangerPolicy policy2 = mock(RangerPolicy.class);
	policies.add(policy2);
	when(_store.getPoliciesByResourceSignature(serviceName, hexSignature, isPolicyEnabled)).thenReturn(policies);
	List<RangerPolicy> result = _validator.getPoliciesForResourceSignature(serviceName, hexSignature);
	Assert.assertTrue(result.contains(policy1) && result.contains(policy2));
}