Fix {assign,unassign}PrivateIpAddresses and add test cases for it