# Failed test 'error intended, wrong method name' # died: No public method 'hasLanguageXXX' defined for # class 'main::com::pdfunit::validators::DocumentValidator' # at C:/.../pdfunit-typical-error_java-syntax-error.t line 36. Can't locate object method "getMessage" via package. "No public method 'hasLanguageXXX' defined for class 'main::com::pdfunit::validators::DocumentValidator' at C:/.../pdfunit-typical-error_java-syntax-error.t line 36.
The modul Inline::Java searches the method with the wrong name in all known Java classes, can't found it and throws an exception. The error message contains the name of the analyzed class. Read the Javadoc documentation, maybe you find the correct written method.
lives_ok { my $pdfUnderTest = "$resources_dir/language/localeDemo_de.pdf"; AssertThat->document($pdfUnderTest) ->hasLanguageXXX('de') # error, not existing method ; } "typical error, wrong method name";