tests: improve error handling in test_jvm

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
tests: test JavaVM::destroy and ::env

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
tests: add errors to the jvm tests

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>