add java classes and tests