@Test
public void testUnexpected() {

	// this documents some unexpected behavior of the ip matcher
	RangerIpMatcher ipMatcher = createMatcher(new String[]{"1.2.3.*"} );
	// NOTE: absurd and downright illegal ipv4 address would match too!
	Assert.assertTrue(ipMatcher.isMatched(createRequest("1.2.3.123567")));
	Assert.assertTrue(ipMatcher.isMatched(createRequest("1.2.3..123567")));
	Assert.assertTrue(ipMatcher.isMatched(createRequest("1.2.3.boo")));
	Assert.assertTrue(ipMatcher.isMatched(createRequest("1.2.3.")));
	
	// wildcard match happens only at the end
	ipMatcher = createMatcher(new String[]{"1.*.3.4"} );
	Assert.assertFalse(ipMatcher.isMatched(createRequest("1.3.3.4")));
	Assert.assertFalse(ipMatcher.isMatched(createRequest("1.1.3.4")));
	// it becomes a literal match!
	Assert.assertTrue(ipMatcher.isMatched(createRequest("1.*.3.4")));
	
	// same is true of ipv6
	ipMatcher = createMatcher(new String[]{"99:a9:b9:c9:*"} );
	// NOTE: absurd and downright illegal ipv4 address would match too!
	Assert.assertTrue(ipMatcher.isMatched(createRequest("99:a9:b9:c9:*")));
	Assert.assertTrue(ipMatcher.isMatched(createRequest("99:a9:b9:c9:1.3.4")));
	Assert.assertTrue(ipMatcher.isMatched(createRequest("99:a9:b9:c9: <:-) ")));
}