Factored out the shared part of GBM javapredict test.