@Override
  public ImportResult importItem(
      UUID id,
      IdempotentImportExecutor idempotentExecutor,
      TokensAndUrlAuthData authData,
      MailContainerResource data) throws Exception {

    // Lazy init the request for all labels in the destination account, since it may not be needed
    // Mapping of labelName -> destination label id
    Supplier<Map<String, String>> allDestinationLabels = allDestinationLabelsSupplier(authData);

    // Import folders/labels
    importLabels(authData, idempotentExecutor, allDestinationLabels, data.getFolders());


    // Import the special DTP label
    importDTPLabel(authData, idempotentExecutor, allDestinationLabels);

    // Import labels from the given set of messages
    importLabelsForMessages(
            authData, idempotentExecutor, allDestinationLabels, data.getMessages());

    importMessages(authData, idempotentExecutor, data.getMessages());

    return ImportResult.OK;
  }
@Test
  public void importMessage() throws Exception {
    MailContainerResource resource =
        new MailContainerResource(null, Collections.singletonList(MESSAGE_MODEL));

    ImportResult result = googleMailImporter.importItem(JOB_ID, executor, null, resource);

    // Getting list of labels from Google
    verify(labelsList, atLeastOnce()).execute();
    // Importing message
    ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
    verify(messages).insert(eq(GoogleMailImporter.USER), messageArgumentCaptor.capture());
    assertThat(messageArgumentCaptor.getValue().getRaw()).isEqualTo(MESSAGE_RAW);
    // TODO(olsona): test labels
  }