Test to generate pdf in java