@Test
  public void shouldDeleteAddressAndEmailAndPhoneOnCascade() {
    OutsiderTeacher model = OutsiderTeacherTest.createOne();
    scenarioHelper.createOutsiderTeacher(model);
    outsiderTeacherRepository.delete(new OutsiderTeacherDomain(model));

    assertThat(addressRepository.findAll()).isEmpty();
    assertThat(emailRepository.findAll()).isEmpty();
    assertThat(phoneRepository.findAll()).isEmpty();
  }
  @Test
  public void shouldRemoveAddress() {
    OutsiderTeacher teacher = scenarioHelper.createOutsiderTeacher();

    assertThat(teacher.getContact().getAddresses()).isNotEmpty();

    for (Address address : teacher.getContact().getAddresses()) {
      outsiderTeacherManager.removeAddress(address.getId());
    }
    assertThat(outsiderTeacherManager.findOneById(teacher.getId()).getContact().getAddresses())
        .isEmpty();
    assertThat(addressRepository.findAll()).isEmpty();
  }
  @Test
  public void shouldCreateAddressAndEmailAndPhoneOnCascade() {
    OutsiderTeacher model = OutsiderTeacherTest.createOne();
    scenarioHelper.createOutsiderTeacher(model);
    OutsiderTeacher fetched = outsiderTeacherManager.findOneById(model.getId());

    assertThat(addressRepository.findAll()).hasSameSizeAs(model.getContact().getAddresses());
    assertThat(emailRepository.findAll()).hasSameSizeAs(model.getContact().getEmails());
    assertThat(phoneRepository.findAll()).hasSameSizeAs(model.getContact().getPhones());
    assertThat(fetched.getContact().getAddresses())
        .hasSameSizeAs(model.getContact().getAddresses());
    assertThat(fetched.getContact().getEmails()).hasSameSizeAs(model.getContact().getEmails());
    assertThat(fetched.getContact().getPhones()).hasSameSizeAs(model.getContact().getPhones());
  }
  @Test
  public void shouldAddAddress() {
    OutsiderTeacher teacher = scenarioHelper.createEmptyOutsiderTeacher();
    Address address = AddressTest.createOne(scenarioHelper.createAddressType());

    assertThat(outsiderTeacherManager.findOneById(teacher.getId()).getContact().getAddresses())
        .isEmpty();
    Address saved = outsiderTeacherManager.addAddress(teacher.getId(), address);

    assertThat(addressRepository.findAll()).hasSize(1);
    assertThat(outsiderTeacherManager.findOneById(teacher.getId()).getContact().getAddresses())
        .hasSize(1);
    assertThat(saved.getId()).isNotNull();
  }