wordcount test in java