added new java test case, but its not exhaustive--TOFROM is broken and needs to be fixed