@Test
public void test_getResourceSignature_happyPath() {

	// null policy returns signature of empty resource
	RangerPolicy policy = null;
	PolicySerializer serializer = new PolicySerializer(policy);
	Assert.assertTrue("Null policy", serializer.toString() == "");
	
	policy = mock(RangerPolicy.class);
	when(policy.getPolicyType()).thenReturn(null);
	Map<String, RangerPolicyResource> policyResources = _utils.createPolicyResourceMap(first);
	when(policy.getResources()).thenReturn(policyResources);
	when(policy.getZoneName()).thenReturn(null);
	serializer = new PolicySerializer(policy);
	String expectedVersion = "version=1";
	String expectedType = "type=0";
	String expectedResource = "{" +
		"col={values=[col1, col2, col3],excludes=false,recursive=true}, " +
		"db={values=[db1, db2],excludes=false,recursive=false}, " +
		"table={values=[tbl1, tbl2, tbl3],excludes=true,recursive=false}" +
	"}";
	String serializationFormat = "{%s,%s,resource=%s}";
	String expectedFull = String.format(serializationFormat, expectedVersion, expectedType, expectedResource);
	Assert.assertEquals(expectedFull, serializer.toString());
	// order of values should not matter
	policyResources = _utils.createPolicyResourceMap(data_second);
	when(policy.getResources()).thenReturn(policyResources);
	Assert.assertEquals(expectedFull, serializer.toString());
	// changing the policy type has expected changes
	when(policy.getPolicyType()).thenReturn(1);
	expectedType="type=1";
	expectedFull =  String.format(serializationFormat, expectedVersion, expectedType, expectedResource);
	Assert.assertEquals(expectedFull, serializer.toString());
}