migrated scala tests to use java