Fix #3

The java cucumber plugin is crashing for me on Jenkins because of #3. This pull request adds a test for issue #3 and fixes the crash.