    @Test
    public void testRunProcessDeleteSomeFilesToUpload() throws Exception {

        final String bucketName = "someName";
        final String bucketRegion = "someRegion";
        final String uploadTaskLogBucket = uploadTaskLog + bucketName;
        final String desiredArtifactPaths = "src,examples/subfolder";
        final String sourcePath = "src";
        final String destinationPath = sourcePath;
        final File file1 = new File("src/file1.html");
        final File file2 = new File("src/file2.html");
        final File file3 = new File("src/file3.html");

        uploadAdapterMock = spy(AWSS3UploadAdapter.class);
        doReturn(uploadAdapterMock).when(uploadAdapterMock).withLogger(any(BuildProgressLogger.class));
        doNothing().when(uploadAdapterMock).uploadToBucket(anyString(), any(AmazonS3.class), ArgumentMatchers.<ArtifactsCollection>anyList(), nullable(String.class));
        deleteAdapterMock = mock(AWSS3DeleteAdapter.class);
        awsS3AdapterMock = new AWSS3Adapter(uploadAdapterMock, deleteAdapterMock).withLogger(loggerMock);

        runnerParametersMock.put(PluginConstants.UI_PARAM_BUCKET_NAME, bucketName);
        runnerParametersMock.put(PluginConstants.UI_PARAM_CONTENT_PATHS, desiredArtifactPaths);

        List<ArtifactsCollection> artifacts = mockGetArtifacts(desiredArtifactPaths, sourcePath, destinationPath, file1, file2, file3);

        mockBuilderCreateModel(bucketName, bucketRegion, "true", desiredArtifactPaths, null);
        adapter = new AWSS3BuildProcessAdapter(loggerMock, runnerParametersMock, agentCheckoutDirectoryMock, extensionHolderMock, awsS3AdapterMock, processAdapterHelperMock);

        adapter.runProcess();

        verifyDeleteOperationExecuted(bucketName);

        verify(loggerMock).targetStarted(uploadTaskLogBucket);
        verify(uploadAdapterMock).uploadToBucket(bucketName, amazonS3Mock, artifacts, null);
        verify(processAdapterHelperMock, never()).createBuildProblemData(bucketName, noUploadErrorLog);
        verify(loggerMock).targetFinished(uploadTaskLogBucket);
    }