test: add test to show JavaScript error when saving Java objects