java immutable object creation test