Fix JavaParser test failure due to non-transitive optional dependencies.