Solution
Replace 'import static org.springframework.test.util.MatcherAssertionErrors.assertThat;' with 'import static org.hamcrest.MatcherAssert.assertThat;'
Solution
The default JavaScript engine present in Java 8 was later removed in Java 11+. Please use external dependencies like 'GraalVM' JS engine to keep the functionality. Please note the language name for the JS engine needs to be changed from 'javascript' to 'graal.js'.