Add tests for new AddressPubKey type.

More tests are needed and will be completed in future commits.