[Java] Minor refactoring and Multi source/destination tests