### Question:
GoogleMailImporter implements Importer<TokensAndUrlAuthData, MailContainerResource> { @Override public ImportResult importItem( UUID id, IdempotentImportExecutor idempotentExecutor, TokensAndUrlAuthData authData, MailContainerResource data) throws Exception { Supplier<Map<String, String>> allDestinationLabels = allDestinationLabelsSupplier(authData); importLabels(authData, idempotentExecutor, allDestinationLabels, data.getFolders()); importDTPLabel(authData, idempotentExecutor, allDestinationLabels); importLabelsForMessages( authData, idempotentExecutor, allDestinationLabels, data.getMessages()); importMessages(authData, idempotentExecutor, data.getMessages()); return ImportResult.OK; } GoogleMailImporter(GoogleCredentialFactory credentialFactory, Monitor monitor); @VisibleForTesting  GoogleMailImporter(
      GoogleCredentialFactory credentialFactory, Gmail gmail, Monitor monitor); @Override ImportResult importItem(
      UUID id,
      IdempotentImportExecutor idempotentExecutor,
      TokensAndUrlAuthData authData,
      MailContainerResource data);  }### Answer:
@Test public void importMessage() throws Exception { MailContainerResource resource = new MailContainerResource(null, Collections.singletonList(MESSAGE_MODEL)); ImportResult result = googleMailImporter.importItem(JOB_ID, executor, null, resource); verify(labelsList, atLeastOnce()).execute(); ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class); verify(messages).insert(eq(GoogleMailImporter.USER), messageArgumentCaptor.capture()); assertThat(messageArgumentCaptor.getValue().getRaw()).isEqualTo(MESSAGE_RAW); }