Convert JS testing goals into Java for speed