Java fix tests and cleanup

Java fix tests and cleanup