@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 shouldRemoveEmail() {
    OutsiderTeacher teacher = scenarioHelper.createOutsiderTeacher();

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

    for (Email email : teacher.getContact().getEmails()) {
      outsiderTeacherManager.removeEmail(email.getId());
    }
    assertThat(outsiderTeacherManager.findOneById(teacher.getId()).getContact().getEmails())
        .isEmpty();
    assertThat(emailRepository.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 shouldAddEmail() {
    OutsiderTeacher teacher = scenarioHelper.createEmptyOutsiderTeacher();
    Email email = EmailTest.createOne(scenarioHelper.createEmailType());

    assertThat(outsiderTeacherManager.findOneById(teacher.getId()).getContact().getEmails())
        .isEmpty();
    Email saved = outsiderTeacherManager.addEmail(teacher.getId(), email);

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