### Question:
GooglePhotosImporter implements Importer<TokensAndUrlAuthData, PhotosContainerResource> { @VisibleForTesting String importSingleAlbum(UUID jobId, TokensAndUrlAuthData authData, PhotoAlbum inputAlbum) throws IOException, InvalidTokenException, PermissionDeniedException { GoogleAlbum googleAlbum = new GoogleAlbum(); String title = COPY_PREFIX + inputAlbum.getName(); if (title.length() > 500) { title = title.substring(0, 497) + "..."; } googleAlbum.setTitle(title); GoogleAlbum responseAlbum = getOrCreatePhotosInterface(jobId, authData).createAlbum(googleAlbum); return responseAlbum.getId(); } GooglePhotosImporter(
      GoogleCredentialFactory credentialFactory,
      TemporaryPerJobDataStore jobStore,
      JsonFactory jsonFactory,
      Monitor monitor,
      double writesPerSecond); @VisibleForTesting  GooglePhotosImporter(
      GoogleCredentialFactory credentialFactory,
      TemporaryPerJobDataStore jobStore,
      JsonFactory jsonFactory,
      Map<UUID, GooglePhotosInterface> photosInterfacesMap,
      GooglePhotosInterface photosInterface,
      ImageStreamProvider imageStreamProvider,
      Monitor monitor,
      double writesPerSecond); @Override ImportResult importItem(
      UUID jobId,
      IdempotentImportExecutor idempotentImportExecutor,
      TokensAndUrlAuthData authData,
      PhotosContainerResource data);  }### Answer:
@Test public void importAlbum() throws Exception { String albumName = "Album Name"; String albumDescription = "Album description"; PhotoAlbum albumModel = new PhotoAlbum(OLD_ALBUM_ID, albumName, albumDescription); GoogleAlbum responseAlbum = new GoogleAlbum(); responseAlbum.setId(NEW_ALBUM_ID); Mockito.when(googlePhotosInterface.createAlbum(any(GoogleAlbum.class))) .thenReturn(responseAlbum); googlePhotosImporter.importSingleAlbum(uuid, null, albumModel); ArgumentCaptor<GoogleAlbum> albumArgumentCaptor = ArgumentCaptor.forClass(GoogleAlbum.class); Mockito.verify(googlePhotosInterface).createAlbum(albumArgumentCaptor.capture()); assertEquals(albumArgumentCaptor.getValue().getTitle(), "Copy of " + albumName); assertNull(albumArgumentCaptor.getValue().getId()); }