TestJS.java exceptions handling added