Added phone-number assignment test and sammple example.java

Hello @kytrinyx,

Added tests for phone-number assignment for Java Track too. Please take a look :-)

(Ideally, I think better if this goes after #984 )

Thank you,
Sagar