### Question:
FileShareMountManager { @Transactional(propagation = Propagation.REQUIRED) public FileShareMount save(final FileShareMount fileShareMount) { LOGGER.debug("Create new FileShareMount: " + fileShareMount); Assert.notNull(fileShareMount.getRegionId(), "Region id cannot be null for File share mount!"); Assert.notNull(fileShareMount.getMountType(), "Mount type cannot be null for File share mount!"); if (MountType.LUSTRE == fileShareMount.getMountType()) { Assert.isTrue(NFSHelper.isValidLustrePath(fileShareMount.getMountRoot()), "Given path for the Lustre file share is invalid!"); } if (fileShareMount.getId() != null && fileShareMountDao.loadById(fileShareMount.getId()).isPresent()) { fileShareMountDao.update(fileShareMount); return fileShareMount; } return fileShareMountDao.create(fileShareMount); }  FileShareMount load(final Long id); Optional<FileShareMount> find(final Long id); List<FileShareMount> loadByRegionId(final Long regionId); @Transactional(propagation = Propagation.REQUIRED) FileShareMount save(final FileShareMount fileShareMount); @Transactional(propagation = Propagation.REQUIRED) void delete(final Long id);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void saveThrowIfRegionIdIsNull() { FileShareMount fileShareMount = new FileShareMount(); fileShareMount.setMountType(MountType.NFS); shareMountManager.save(fileShareMount); }
@Test(expected = IllegalArgumentException.class) public void saveThrowIfMountTypeIsNull() { FileShareMount fileShareMount = new FileShareMount(); fileShareMount.setRegionId(0L); shareMountManager.save(fileShareMount); }
@Test(expected = IllegalArgumentException.class) public void saveThrowIfLustreMountRootIsInvalid() { final FileShareMount fileShareMount = new FileShareMount(); fileShareMount.setRegionId(0L); fileShareMount.setMountType(MountType.LUSTRE); fileShareMount.setMountRoot("host"); shareMountManager.save(fileShareMount); }