Hb: restore tests. Replace Java with JS