Fix Java properties grammar file and added more tests.