fix test, clean up some JavaClient code
add Eq for Method