@BeforeEach
  public void setUp() throws IOException {
    MicrosoftCredentialFactory credentialFactory = mock(MicrosoftCredentialFactory.class);
    mediaInterface = mock(MicrosoftMediaInterface.class);
    driveItemsResponse = mock(MicrosoftDriveItemsResponse.class);
    Monitor monitor = mock(Monitor.class);

    microsoftMediaExporter = new MicrosoftMediaExporter(
        credentialFactory, new JacksonFactory(), mediaInterface, monitor);

    when(mediaInterface.getDriveItems(any(Optional.class), any(Optional.class)))
        .thenReturn(driveItemsResponse);
    when(mediaInterface.getDriveItemsFromSpecialFolder(
             any(MicrosoftSpecialFolder.FolderType.class)))
        .thenReturn(driveItemsResponse);
    verifyNoInteractions(credentialFactory);
  }
Unit tests of Microsoft onedrive exporter for Media models.
extensions/data-transfer/portability-data-transfer-microsoft/src/test/java/org/datatransferproject/transfer/microsoft/media/MicrosoftMediaExporterTest.java