You indicated you have a public key.
Is this your own key or is this someone elses who you intend to send the encrypted file to?
I assume it must be someone elses because if it was your own key
you should already know the password and be able to generate the private key for it using PGP desktop or numerous free utilities to generate key pairs.
If my assumption is right, the easiest way to test your routine is to encrypt the file to
TWO public keys. The public key of the person you intend to send the file to
as well as your own public key. This way, you will both be able to decrypt the file.
You are probably already using
encryptedDataGenerator.addMethod(PGPPublicKey) to add the public key you have.
Just do this a second time with your own key as well.
Then the file will be encrypted to both keys allowing both people to decrypt it.