removed trailing generated java code and fixed tests