testing the apache spark with java api