### Question:
Media implements SilverContentInterface, Serializable { public void removeFromAllAlbums() { MediaServiceProvider.getMediaService().removeMediaFromAllAlbums(this); } Media(); protected  Media(final Media other); MediaPK getMediaPK(); void setMediaPK(MediaPK mediaPK); void setId(String mediaId); @Override String getId(); void setComponentInstanceId(String instanceId); @Override String getInstanceId(); @Override String getContributionType(); abstract MediaType getType(); @Override String getTitle(); void setTitle(String title); @Override String getDescription(); void setDescription(String description); String getAuthor(); void setAuthor(String author); String getKeyWord(); void setKeyWord(String keyWord); Period getVisibilityPeriod(); void setVisibilityPeriod(final Period visibilityPeriod); boolean isVisible(); @Override Date getCreationDate(); void setCreationDate(Date createDate); @Override User getCreator(); void setCreator(User creator); @Override String getCreatorId(); void setCreatorId(String creatorId); String getCreatorName(); @Override User getLastModifier(); @Override Date getLastModificationDate(); Date getLastUpdateDate(); void setLastUpdateDate(Date lastUpdateDate); User getLastUpdater(); void setLastUpdater(User lastUpdater); String getLastUpdatedBy(); void setLastUpdatedBy(String lastUpdatedBy); String getLastUpdaterName(); @Override boolean canBeAccessedBy(final User user); String getWorkspaceSubFolderName(); String getPermalink(); boolean isPreviewable(); String getApplicationThumbnailUrl(MediaResolution mediaResolution); String getApplicationEmbedUrl(MediaResolution mediaResolution); String getApplicationOriginalUrl(); SilverpeasFile getFile(final MediaResolution mediaResolution); abstract SilverpeasFile getFile(final MediaResolution mediaResolution, final String size); @Override String getSilverpeasContentId(); void setSilverpeasContentId(String silverpeasContentId); void setIconUrl(String iconUrl); @Override String getIconUrl(); boolean isDownloadable(); @Override String getURL(); @Override String getDate(); @Override String getSilverCreationDate(); @Override String getName(); @Override String getName(String language); @Override String getDescription(String language); @Override Collection<String> getLanguages(); String toString(); boolean equals(Object o); @Override int hashCode(); InternalMedia getInternalMedia(); Photo getPhoto(); Video getVideo(); Sound getSound(); Streaming getStreaming(); void removeFromAllAlbums(); void addToAlbums(String... albumIds); void setToAlbums(String... albumIds); abstract Media getCopy(); static final FileBasePath BASE_PATH; }### Answer:
@Test public void testRemoveMediaFromAllAlbums(@TestManagedMock GalleryService mediaServiceMock) { Media media = defaultMedia(); media.removeFromAllAlbums(); verify(mediaServiceMock, times(1)).removeMediaFromAllAlbums(media); }