@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();
  }
 @Test(expected = AddressTypeResourceNotFoundException.class)
 public void shouldFailAddAddressWithAddressHavingNonExistingType() {
   OutsiderTeacher model = scenarioHelper.createEmptyOutsiderTeacher();
   outsiderTeacherManager.addAddress(model.getId(), AddressTest.createOne());
 }
 @Test(expected = TeacherResourceNotFoundException.class)
 public void shouldFailAddAddressWithNonExistingTeacher() {
   AddressType type = scenarioHelper.createAddressType();
   outsiderTeacherManager.addAddress(12L, AddressTest.createOne(type));
 }
 @Test(expected = AlreadyDefinedInOnNonPersistedEntity.class)
 public void shouldFailAddAddressWithAddressHavingIdAlreadyDefined() {
   Address model = AddressTest.createOne();
   model.setId(12L);
   outsiderTeacherManager.addAddress(12L, model);
 }
 /*
  * addAddress()
  */
 @Test(expected = IllegalArgumentException.class)
 public void shouldFailAddAddressWithNullTeacherId() {
   outsiderTeacherManager.addAddress(null, AddressTest.createOne());
 }