Use if(POLICY) to check whether policy exists.
Add a test for the Java wrappers.