@@ -0,0 +1,1588 @@
+package ru.sfwt.mt.addressbook.tests;%0A%0A%0Aimport org.hamcrest.CoreMatchers;%0Aimport org.hamcrest.MatcherAssert;%0Aimport org.testng.annotations.Test;%0Aimport ru.sfwt.mt.addressbook.model.AddressData;%0A%0Aimport java.util.Arrays;%0Aimport java.util.stream.Collectors;%0A%0Aimport static org.hamcrest.CoreMatchers.equalTo;%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0A%0Apublic class AddressPhoneEmailUserAddressTests extends TestBase%7B%0A  @Test%0A  public void testAddressPhoneEmailUserAddress()%7B%0A    app.goTo().homePage();%0A    AddressData address = app.contact().all().iterator().next();%0A    AddressData contactInfoFromEditForm = app.contact().contactInfoFromEditForm(address);%0A%0A    assertThat(address.getAllPhones(), equalTo(mergePhones(contactInfoFromEditForm)));%0A    assertThat(address.getAllEmails(), equalTo(mergeEmails(contactInfoFromEditForm)));%0A    assertThat(address.getUserAddress(), equalTo(contactInfoFromEditForm.getUserAddress()));%0A  %7D%0A  private String mergePhones(AddressData address) %7B%0A    return Arrays.asList(address.getHomenumber(), address.getMobilenumber(), address.getWorknumber()).stream()%0A            .filter((s) -%3E ! s.equals(%22%22))%0A            .map(AddressPhoneTests::cleaned).collect(Collectors.joining(%22%5Cn%22));%0A  %7D%0A  private String mergeEmails(AddressData address) %7B%0A    return Arrays.asList(address.getEmail1(), address.getEmail2(), address.getEmail3())%0A            .stream()%0A            .filter((s) -%3E ! s.equals(%22%22)).collect(Collectors.joining(%22%5Cn%22));%0A  %7D%0A  public static String cleaned(String phone) %7B%0A    return phone.replaceAll(%22%5C%5Cs%22, %22%22).replaceAll(%22%5B-()%5D%22, %22%22);%0A  %7D%0A%7D%0A

Create one test AddressEmailUserAddressTest instead of three