Add project sample to write custom rules in Java