@Test
@SuppressWarnings("deprecation")
public void testSetPhones() {
init();
final DefaultTelephone tel1 = new DefaultTelephone("00.01", UnsupportedCodeList.valueOf("SMS"));
final DefaultTelephone tel2 = new DefaultTelephone("00.02", UnsupportedCodeList.VOICE);
final DefaultTelephone tel3 = new DefaultTelephone("00.03", UnsupportedCodeList.FACSIMILE);
final DefaultTelephone tel4 = new DefaultTelephone("00.04", UnsupportedCodeList.VOICE);
final DefaultTelephone[] tels = new DefaultTelephone[] {tel1, tel2, tel3, tel4};
final DefaultContact contact = new DefaultContact();
contact.setPhones(Arrays.asList(tel1, tel2, tel3, tel4));
assertArrayEquals("getPhones", tels, contact.getPhones().toArray());
assertSame("getPhone", tel2, contact.getPhone());
assertEquals("warningOccured", "IgnoredPropertyAssociatedTo_1", resourceKey);
assertArrayEquals("warningOccured", new String[] {"SMS"}, parameters);
verifyLegacyLists(tels);
}